add FAQ
This commit is contained in:
parent
894e603a64
commit
67d6a60a37
34
README.md
34
README.md
|
@ -192,6 +192,40 @@ Listening on 0.0.0.0:443 for secure traffic
|
|||
For a more detail read the full
|
||||
[WALKTHROUGH](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/WALKTHROUGH.md).
|
||||
|
||||
# FAQ
|
||||
### 1. But did YOU read the QuickStart?
|
||||
|
||||
Most of the questions I get come from people not even looking at the QuickStart and just jumping to asking a quostion
|
||||
|
||||
### 2. How to use JavaScript configuration?
|
||||
|
||||
You don't. The configuration has to be serializable (i.e. could go in a database).
|
||||
|
||||
(General rule of thumb: commit code, not data / config.)
|
||||
|
||||
The config file is meant for **simple** use cases, for the average dev and it is managed with `npx greenlock ...`, as shown in the QuickStart.
|
||||
|
||||
If you have an **advanced** use case (i.e. you need stuff in a database), you can use the Greenlock API (not Greenlock Express) and you'll love it.
|
||||
|
||||
If you're layering a lot of **complexity** with dev ops tools, but you don't really understand the tools that well (i.e. Docker), either use ENVIRONMENT variables or put the `npx greenlock ...` commands in your setup script.
|
||||
|
||||
You can also just mangle the Greenlock API to do what you want... but I don't recommend it. Keep it simple.
|
||||
|
||||
### 3. How to use non-standard ports (not 80, 443)?
|
||||
|
||||
You don't. Not usually.
|
||||
|
||||
Let's Encrypt **REQUIRES port 80** for HTTP-01 challenges.
|
||||
|
||||
But if you're using DNS-01 or you have a proxy in place, just use the raw node server. See these examples:
|
||||
|
||||
- [examples/http/server.js](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples/http/server.js)
|
||||
- [examples/https/server.js](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples/https/server.js)
|
||||
|
||||
If you want to use Greenlock as a proxy, see this example:
|
||||
|
||||
- [examples/http-proxy/server.js](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples/http-proxy/server.js)
|
||||
|
||||
# Examples
|
||||
|
||||
To see all of the examples, just browse [greenlock-express.js/examples/](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples)
|
||||
|
|
Loading…
Reference in New Issue