hello word
const express = require('express')const app = express()app.get('/',(req,rep)=>{rep.send('hello word')})app.listen(3000,()=>{console.log('http://localhost:3000/')})// cp -r 01 02 递归复制01 到 02可以使用app.[method] = function(res,rep){}
request/response
- request继承自http.IncomingMessage
- response继承自http.ServerResponse
https://www.expressjs.com.cn/5x/api.html#res.end
中间件
- 定义

- 使用
404
内置中间件
all





