A cli tool to quickly create and manage nginx server blocks. https://up.js.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

27 lines
617 B

// These functions just return paths. Later, these should be modified to poll from nginx's config.
var enabled = "/etc/nginx/sites-enabled/";
var conf = "/etc/nginx/conf.d/";
var wwwRoot = "/etc/up-serve/static/";
function enabledSites() {
return enabled;
}
function confD() {
return conf;
}
function webRoot() {
return wwwRoot;
}
function webRootDomain(domain, outPort) {
var rootWithDomain = wwwRoot + domain + "." + outPort;
return rootWithDomain;
}
module.exports.confD = confD;
module.exports.enabledSites = enabledSites;
module.exports.webRoot = webRoot;
module.exports.webRootDomain = webRootDomain;