4 回复
@echo off echo.
set NodePackagesPath=E:\Projects\OpenShift\Materials\Node.js
set Path=%NodePackagesPath%\node_modules.bin;%PATH% set Path=%NodePackagesPath%;%PATH%
set NODE_PATH=%NodePackagesPath%\node_modules;%NODE_PATH% set NODE_ENV=production
echo Environment variables are successfully added. echo. echo. echo.
node server.js
http://stackoverflow.com/questions/20220477/run-node-server-with-a-bat-file