
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
@ind.ie/https-server
Advanced tools
A secure Small Tech personal web server for seamless development and live use.
HTTPS Server is a secure Small Tech personal web server for seamless development and live use.
HTTP Server uses nodecert for seamless locally-trusted TLS certificate provisioning and use during development and ACME TLS for seamless globally-trusted Let’s Encrypt TLS certificate provisioning and use on live environments.
npm i -g @ind.ie/https-server
Start serving the current directory at https://localhost:
$ https-server
Start serving the site directory at your hostname:
$ https-server site --global
For example, if you run the command on a connected server that has the ar.al domain pointing to it and ar.al set in /etc/hostname (on Unix/Linux), you will be able to access the site at https://ar.al. The first time you access it, it will take a little longer to load as your Let’s Encrypt certificates are being automatically provisioned.
https-server [folder-to-serve] [--port N] [--global] [--version]
All command-line arguments are optional. By default, an HTTPS server with locally-trusted certificates will be created for you to serve the current folder over port 443.
If you do not already have TLS certificates, they will be created for you automatically using nodecert.
All dependencies are installed automatically for you if they do not exist if you have apt, pacman, or yum (untested) on Linux or if you have Homebrew or MacPorts (untested) on macOS.
If you specify the --global flag, globally-trusted Let’s Encrypt TLS certificates are automatically provisioned for you using ACME-TLS the first time you hit your hostname. The hostname for the certificates is automatically set from the hostname of your system (and the www. subdomain is also automatically provisioned).
HTTPS Server’s createServer method behaves like the built-in https module’s createServer function. Anywhere you use https.createServer, you can simply replace it with httpsServer.createServer.
options (object): see https.createServer. Populates the cert and key properties from the automatically-created nodecert or Let’s Encrypt certificates and will overwrite them if they exist in the options object you pass in. If your options has options.global = true set, globally-trusted TLS certificates are obtained from Let’s Encrypt using ACME TLS.
requestListener (function): see https.createServer. If you don’t pass a request listener, HTTPS Server will use its default one.
Returns: https.Server instance, configured with either locally-trusted certificates via nodecert or globally-trusted ones from Let’s Encrypt.
const httpsServer = require('https-server')
const express = require('express')
const app = express()
app.use(express.static('.'))
const options = {} // to use globally-trusted certificates instead, set this to {global: true}
const server = httpsServer.createServer(options, app).listen(443, () => {
console.log(` 🎉 Serving on https://localhost\n`)
})
Options is an optional parameter object that may contain the following properties, all optional:
path (string): the directory to serve using Express.static.
callback (function): a function to be called when the server is ready. If you do not specify a callback, you can specify the port as the second argument.
port (number): the port to serve on. Defaults to 443. (On Linux, privileges to bind to the port are automatically obtained for you.)
global (boolean): if true, globally-trusted Let’s Encrypt certificates will be provisioned (if necesary) and used via ACME TLS. If false (default), locally-trusted certificates will be provisioned (if necesary) and used using nodecert.
Returns: https.Server instance, configured with either locally or globally-trusted certificates.
Using locally-trusted TLS certificates:
const httpsServer = require('https-server')
// Serve the current directory over https://localhost
const server = httpsServer.serve()
Using globally-trusted TLS certificates:
const httpsServer = require('https-server')
// Serve the current directory over https://localhost
const server = httpsServer.serve({global: true})
I can use your help to test HTTPS Server on the following platform/package manager combinations:
Please let me know how/if it works. Thank you!
Also, automatic hostname detection has not been implemented for Windows and so globally-trusted certificates will fail on that platform. If you get to it before I do, I would appreciate a pull request.
thagoat for confirming that installation works on Arch Linux with Pacman.
Tim Knip for confirming that the module works with 64-bit Windows with the following behaviour: “Install pops up a windows dialog to allow adding the cert.”
Run Rabbit Run for the following information on 64-bit Windows: “Win64: works with the windows cert install popup on server launch. Chrome and ie are ok with the site then. FF 65 still throws the cert warning even after restarting.”
FAQs
Deprecated, please use @ind.ie/web-server instead.
The npm package @ind.ie/https-server receives a total of 2 weekly downloads. As such, @ind.ie/https-server popularity was classified as not popular.
We found that @ind.ie/https-server demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.