diff --git a/actions/createStaticServer.js b/actions/createStaticServer.js index 5567b1a..02fc597 100644 --- a/actions/createStaticServer.js +++ b/actions/createStaticServer.js @@ -21,7 +21,7 @@ function createStaticServer(domain, outPort = 80) { ) shell.mkdir('-p', npath.enabledSites()) shell.ln('-sf', conf(npath.availableSites(), domain), conf(npath.enabledSites(), domain)) - shell.ln('-sf', ".", "/var/www" + domain) + shell.ln('-sf', ".", npath.homeDir() + domain) } module.exports = createStaticServer \ No newline at end of file diff --git a/util/nginxPath.js b/util/nginxPath.js index 6c8f338..38634b5 100644 --- a/util/nginxPath.js +++ b/util/nginxPath.js @@ -1,12 +1,17 @@ function availableSites() { - var availableSites = "/etc/nginx/available-sites/" - return availableSites + var availableSites = "/etc/nginx/available-sites/"; + return availableSites; } function enabledSites() { - var enabledSites = "/etc/nginx/enabled-sites/" - return enabledSites + var enabledSites = "/etc/nginx/enabled-sites/"; + return enabledSites; } -module.exports.availableSites = availableSites -module.exports.enabledSites = enabledSites \ No newline at end of file +function homeDir() { + return "/var/www/"; +} + +module.exports.availableSites = availableSites; +module.exports.enabledSites = enabledSites; +module.exports.homeDir = homeDir; \ No newline at end of file