express中间件是个普通的函数,执行中间件是个阻塞的过程
- expres执行 next() 是个阻塞的过程
- express的异步,会破坏洋葱模型,express对洋葱模型兼容的不好
koa洋葱模型
- await之前是穿入
- await之后是穿出
express
- request
- response
request
queryparam()routecookiessignedCookiesget()accepts()acceptsCharset()acceptsLanguage()is()ipipspathhostfreshstatexhrsecuresubdomainsoriginUrl
response
status()set()get()redirect()cookie()clearCookie()location()send()json()jsonp()type()format()attchment()sendfile()download()links()localsrender()
