230070
I read some source code of express in github, bug I have a detail that does not understand const express = require('express') const app = express()
app.use((req, res, next) => { // res is what? is the Writable Stream // debug this code I know the res is a Stream, but I can not distinguish the type of Stream is the writeable or readable })
// reference from nodejs api
http.createServer((req, res) => {
// res is the same as the express's res
// in the doc of nodejs api
// res is an http.ServerResponse, which is a Writable Stream
})
but when it comes to the express app's callback -> res Excuse me?