没有合适的资源?快使用搜索试试~ 我知道了~
Cottage:koa.js上的简单,快速HTTP路由器
共41个文件
js:25个
json:7个
gitignore:3个
需积分: 9 0 下载量 149 浏览量
2021-02-03
14:45:54
上传
评论
收藏 58KB ZIP 举报
温馨提示
Cottage是最快,简单,直观的HTTP路由器框架。 节点上最快的HTTP路由器/框架-查看 简单的代码-使用res.send或ctx.body不会感到厌倦? 我们为什么不能只return响应? 安装 Cottage需要 v8.0.0或更高版本。 $ npm install cottage 例 import { Cottage , Response } from 'cottage' ; const app = new Cottage ( ) ; // just simple return would be enough app . post ( '/' , async ctx => 'Hello world!' ) ; app . get ( '/auth' , async ctx => { // needs fancy response code? return new Response ( 401 , { error : 'unauthorized' } ) ; } ) ; // cottage is built on the top of Koa. app
资源推荐
资源详情
资源评论
收起资源包目录
cottage-master.zip (41个子文件)
cottage-master
.travis.yml 86B
index.js 714B
package.json 1KB
test
nested_router.js 2KB
testutil.js 1KB
middleware.js 4KB
apis
merged.js 11KB
paypal.js 4KB
gplus.js 787B
github.js 11KB
twitter.js 3KB
static.js 6KB
api.js 1KB
router.js 3KB
response.js 1KB
package-lock.json 83KB
index.d.ts 10KB
examples
memo
index.js 2KB
package.json 313B
database.js 382B
setting.json 61B
.gitignore 2KB
README.md 292B
slack-logger
index.js 3KB
package.json 329B
setting.json 17B
.gitignore 1KB
README.md 486B
.gitignore 86B
lib
Application.js 602B
Router.js 8KB
Node.js 5KB
Response.js 1KB
default-handler.js 97B
Tree.js 9KB
Route.js 755B
Layer.js 910B
composer.js 2KB
.nycrc.json 33B
README.md 3KB
.editorconfig 241B
共 41 条
- 1
资源评论
羊欲穷
- 粉丝: 88
- 资源: 4591
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功