1.0.3 • Published 5 years ago
nginx-autoconfig v1.0.3
NGINX Autoconfiguration
A library that generates your NGINX confguration files on http requests.
Syntax for configuration files:
Normal nginx syntax, but you can use ${VAR_NAME} anywhere. Where "VAR_NAME" is a variable, which gets interpolated into your config.
Use:
$ npm i nginx-autoconfig
- something like this:
nginxAutoConfig.start("config", 18888, SECRET, "/etc/nginx/conf.d/", () => { return { BACKEND_PORT: 3000 } });
- write a config file and put it into the "config" folder
$ sudo node file.js
- Profit.