Skip to content

hzm-hubs/koa-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

可参考文档

https://chenshenhai.github.io/koa2-note/note/request/post.html

npm init

npm i koa

文件夹:

app.js 主要设置

bin 启动文件

config 一些基础设置

plugins 插件文件夹

router 路由文件夹

static 静态资源文件夹

views

使用的插件:

koa-router 基础路由

koa-static 静态路由

koa/cors koa的跨域资源共享(CORS)

koa-json JSON 漂亮打印的响应中间件。还将节点对象流转换为二进制。

koa-body 一个全功能的 koa body 解析器中间件。支持多部分、urlencoded 和 json 请求正文。提供与 Express 的 bodyParser 相同的功能 - multer。

koa-onerror koa 的错误处理程序,hack ctx.onerror。

koa-jwt 用于验证 JSON Web 令牌的 Koa 中间件。

koa2-request koa2的request库封装,支持async和await写法

About

example of koa

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published