【文件属性】:
文件名称:操场-koa:Koa的操场
文件大小:7KB
文件格式:ZIP
更新时间:2021-02-03 17:36:58
koa node koa-helmet koa-router koa-bodyparser
运动场
由。
Koa的游乐场。
发展历程
克隆仓库
$ git clone https://github.com/robertoachar/playground-koa.git
安装依赖项
$ npm install
运行脚本
行动
用法
开始开发模式
npm start
皮棉代码
npm run lint
环境
# .env file
NODE_ENV = development
PORT = 3000
终点
方法
终点
描述
得到
/
获取纯文本数据
得到
/json
获取JSON数据
得到
/user/:id
使用参数获取数据
开机自检
/hello
发布数据
得到
/n
【文件预览】:
playground-koa-master
----package.json(1KB)
----.eslintrc.json(171B)
----.prettierrc(53B)
----LICENSE(1KB)
----src()
--------config.js(325B)
--------index.js(106B)
--------server.js(199B)
--------error.js(418B)
--------logger.js(199B)
--------app.js(287B)
--------router.js(631B)
----.gitignore(1KB)
----CHANGELOG.md(42B)
----.npmrc(94B)
----README.md(1KB)
----.eslintignore(13B)
----.editorconfig(236B)
----.gitattributes(19B)