A quick guide on how to setup Node.js development environment.
Previous versions of these install instructions had been tested with:
function filterDataByMonth(data) { | |
// 得到按时间排序的数据 | |
var numArr = data.map(function (crtVal, idx, arr) { | |
return { | |
amount: crtVal.amount, | |
month: parseInt(crtVal.month) | |
} | |
}).sort(function (a, b) { | |
return a.month - b.month; | |
}); |
A quick guide on how to setup Node.js development environment.
Previous versions of these install instructions had been tested with:
// 安装 npm-check
cnpm i -g npm-check
// 检查版本,项目下的依赖
npm-check -u
// 检查版本,全局依赖
npm-check -u -g
{
"name": "koa2",
"version": "0.1.0",
"private": true,
"scripts": {
"start": "node bin/www",
"dev": "./node_modules/.bin/nodemon bin/www",
"prd": "pm2 start bin/www",