Skip to content

Conversation

@misku
Copy link

@misku misku commented May 5, 2018

Configuration example:

"http_server": {
  "type": "https",
  "port": 8891,
  "cert": "/path/to/fullchain.pem",
  "key": "/path/to/privkey.pem"
}

type: "http" | "https" (default: "http")
port: (default 8282)
cert: path to server certificate
key : path to private key

If "http_server" key is missing, no HTTP server will be started.
If "type" == "https" && ("cert" || "key" is missing or corrupted)
an error will be thrown.

Configuration example:
```
"http_server": {
  "type": "https",
  "port": 8891,
  "cert": "/path/to/fullchain.pem",
  "key": "/path/to/privkey.pem"
}
```
type: "http" | "https" (default: "http")
port: (default 8282)
cert: path to server certificate
key : path to private key

If "http_server" key is missing, no HTTP server will be started.
If "type" == "https" && ("cert" || "key" is missing or corrupted)
an error will be thrown.
@maddox
Copy link
Owner

maddox commented May 7, 2018

This is great, thanks! Just a couple of notes.

  1. Could you make it so enableHTTPserver still enables the http server. Otherwise it will break current installs after an upgrade. This is an easy way to keep some backwards compat.
  2. Could you document this in the README.

@misku
Copy link
Author

misku commented May 7, 2018

Sure, no problem. I'm glad you like it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants