安装node.js
curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
yum install -y nodejs
node -v
npm install cnpm -g --registry=https://registry.npm.taobao.org
网关服务目录
/opt/gateway-api
安装依赖
cd /opt/gateway-api
npm install log4js
npm install express
npm install node-zookeeper-client
npm install http-proxy
npm install cluster
npm install os
npm install forever -g
启动
forever start app.js
停止
forever stop app.js
日志
~/.forever/