1.cnpm init -y
2.cnpm i koa koa-router monk koa-bodyparser --save
3.cnpm i nodemon -g
{
"name": "koa_mini_server",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "nodemon app.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"koa": "^2.6.2",
"koa-bodyparser": "^4.2.1",
"koa-router": "^7.4.0"
}
}
npm start