From d8b3cc96148ae13673e44a1eea9e070db28ebec5 Mon Sep 17 00:00:00 2001 From: alsotang Date: Wed, 27 May 2015 22:11:09 +0800 Subject: [PATCH] NODE_ENV --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 5734c4e..347a106 100644 --- a/Makefile +++ b/Makefile @@ -39,14 +39,14 @@ test-cov cov: install pretest build: @./node_modules/loader/bin/build views . - + run: @node app.js start: install build - @nohup ./node_modules/.bin/pm2 start app.js -i 0 --name "cnode" --max-memory-restart 400M >> cnode.log 2>&1 & + @NODE_ENV=production nohup ./node_modules/.bin/pm2 start app.js -i 0 --name "cnode" --max-memory-restart 400M >> cnode.log 2>&1 & restart: install build - @nohup ./node_modules/.bin/pm2 restart "cnode" >> cnode.log 2>&1 & + @NODE_ENV=production nohup ./node_modules/.bin/pm2 restart "cnode" >> cnode.log 2>&1 & -.PHONY: install test cov test-cov build start restart +.PHONY: install test cov test-cov build run start restart