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
651 B

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