From d05ee86bfbcdae96ec2a211428effdbc93eb46a1 Mon Sep 17 00:00:00 2001 From: lichengyin Date: Mon, 7 Sep 2015 10:02:36 +0800 Subject: [PATCH] replace ROOT_PATH to in template file --- bin/index.js | 6 +++--- template/nginx.conf | 2 +- template/pm2.json | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/index.js b/bin/index.js index ff6ffdb4..0776f2df 100644 --- a/bin/index.js +++ b/bin/index.js @@ -233,11 +233,11 @@ var _copyWwwFiles = function(){ var ROOT_PATH = cwd + '/' + projectRootPath + 'www'; copyFile('nginx.conf', projectRootPath + 'nginx.conf', { - ROOT_PATH: ROOT_PATH + '': ROOT_PATH }); copyFile('pm2.json', projectRootPath + 'pm2.json', { - ROOT_PATH: ROOT_PATH, - APP_NAME: getAppName() + '': ROOT_PATH, + '': getAppName() }); copyFile('.gitignore', projectRootPath + '.gitignore'); diff --git a/template/nginx.conf b/template/nginx.conf index f39d3279..ea439f25 100644 --- a/template/nginx.conf +++ b/template/nginx.conf @@ -1,7 +1,7 @@ server { listen 80; server_name localhost; - root ROOT_PATH; + root ; set $node_port 8360; index index.js index.html index.htm; diff --git a/template/pm2.json b/template/pm2.json index d603366e..216af2bf 100644 --- a/template/pm2.json +++ b/template/pm2.json @@ -1,8 +1,8 @@ { "apps": [{ - "name": "APP_NAME", + "name": "", "script": "production.js", - "cwd": "ROOT_PATH", + "cwd": "", "max_memory_restart": "1G", "autorestart": true, "node_args": [],