start a nginx server.
when config is changed, the nginx server will reload automaticly.
npm install nginx-executor -Dconst path = require('path');
const NginxExecutor = require('nginx-executor');
const nginx = new NginxExecutor({
config: path.resolve(__dirname, './nginx.conf'),
});
nginx.start();// same code like start a server
nginx.stop();// same code like start a server
nginx.reload();