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.mkdir('-p', npath.enabledSites())
shell.ln('-sf', conf(npath.availableSites(), domain), conf(npath.enabledSites(), domain)) 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 module.exports = createStaticServer

17
util/nginxPath.js

@ -1,12 +1,17 @@
function availableSites() { function availableSites() {
var availableSites = "/etc/nginx/available-sites/" var availableSites = "/etc/nginx/available-sites/";
return availableSites return availableSites;
} }
function enabledSites() { function enabledSites() {
var enabledSites = "/etc/nginx/enabled-sites/" var enabledSites = "/etc/nginx/enabled-sites/";
return enabledSites return enabledSites;
} }
module.exports.availableSites = availableSites function homeDir() {
module.exports.enabledSites = enabledSites return "/var/www/";
}
module.exports.availableSites = availableSites;
module.exports.enabledSites = enabledSites;
module.exports.homeDir = homeDir;
Loading…
Cancel
Save