迷你实现express调用中间件
const http = require('http');
const slice = Array.prototype.slice;
class LikeExpress {
constructor(){
// 存放中间件列表
this.routes = {
all: [],
get: [],
post: [],
put: [],
patch: [],
delete: []
}
}
register
原创
2021-06-08 17:35:04 ·
65 阅读 ·
0 评论