HTTPS support for documentation serve
- What version of documentation.js are you using?:
$ grep '"version"' node_modules/documentation/package.json
"version": "11.0.1"
- How are you running documentation.js (on the CLI, Node.js API, Grunt, other?):
npx documentation serve
- Feature Request
documentation serve has no built-in way to serve over HTTPS; you'd have to SSL terminate through nginx, use node-http-proxy, or something like that.
Providing SSL command-line arguments here (e.g. --https-key, --https-cert) would simplify usage in HTTPS-only environments.
- Suggested Fix
In src/commands/serve.js, add command-line args for SSL key / cert, and pass these options to new Server(). By default, these would be undefined, and they would both be required to start up in HTTPS mode.
In src/serve/server.js, use SSL options to decide whether to http.createServer() or https.createServer().
Could you explain the usecase a bit? documentation.js's server is generally meant to be used for the documentation editing process, whereas to deploy and share the documentation, we usually run build and share it as static.