Browse Source

Added homeDir function to util/nginxPath.js

pull/1/head
Muthu Kumar 7 years ago
parent
commit
b21164ad3b
  1. 2
      actions/createStaticServer.js
  2. 17
      util/nginxPath.js

2
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

17
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
function homeDir() {
return "/var/www/";
}
module.exports.availableSites = availableSites;
module.exports.enabledSites = enabledSites;
module.exports.homeDir = homeDir;
Loading…
Cancel
Save