2016-10-11 43 views
1

我想傳遞參數,直到永遠,不會很好:添加參數-c標誌上永遠開始

> NODE_PATH="$(pwd)" NODE_ENV=production forever start -c "node app.js --site=tillvaxt" 

help: usage: forever [action] [options] SCRIPT [script-options] 
...//more help options displayed 

我使用的-c標誌,你可以看到。它是否正確?在Forever中調試並不是最簡單的。

回答

0

嘗試導出而不是設置。像這樣

export NODE_PATH="$(pwd)" && export NODE_ENV=production && forever start -c "node app.js --site=tillvaxt" 

隨着出口你勉強地說envvars中被「注入」的下一個conmmand從當前shell啓動