Write your own express from the shallow to the deep
简单实现http服务,可实现访问服务并且有回应。加入mocha进行测试
实现目标主要是引入简化版的router,并对/get/:id 式的路由进行解析。同时实现app.Methods相应的接口
实现了app.param,app.use,以及req.query中参数的提取工作。其实在本次迭代中app.param和query足以形成一个迭代,再加上app.use内容就比较多,不过我还是将它们放在一个迭代中,还请读者多费些时间去理解。因为理解到这一层了,express的真面目已经揭开一大半了