基于 node.js + express 技术栈,采用MVC结构设计、JWT + RESTful API、PM2服务监控的Node服务器端项目框架.
node.js + express MVCJWT + RESTful APIPM2Node Web
APISosoApi
npm install -g cnpm --registry=https://registry.npm.taobao.org
cnpm install
npm start
npm run live:client //
npm run live:server //
npm test ./test/api/login.js
Please install 'npm install -g node-inspector' at first
npm run debug
Please install 'npm install npm-check-updates -g' at first
npm run update
First of all, please install node.js and git on the server and set $PATH env in ~/.bashrc
export NODE_HOME=/data/node-v7.7.4-linux-x64
export PATH=$NODE_HOME/bin:$PATH
Host key verification after you execute ssh-keygen on server, and set ssh-key to gitlab.
ssh-keyscan -t rsa yourGitServer >> ~/.ssh/known_hosts
For client ssh password-less logon
ssh-keygen -t rsa
ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]
then, use npm run setup:test for the first time, other deployment use npm run deploy:test
npm run setup:test //
npm run setup:simu //
npm run setup:prod //
npm run deploy:test //
npm run deploy:simu //
npm run deploy:prod //
npm run stop
npm run reload
npm run list
npm run monit
npm run logs