Open prateekbhatt opened 10 years ago
How to use express.js middleware in express.io?
express.js middleware are functions with an arity of 3 (req, res, next):
(req, res, next)
app.use(function (req, res, next) { // ...... })
whereas express.io expects middleware functions to have an arity of 2 (data, next):
(data, next)
app.io.use(function (data, next) { // ...... })
Is there any way to use express.js middleware in express.io?
Did you try express.io-middleware ?
You should be able to do want you want.
How to use express.js middleware in express.io?
express.js middleware are functions with an arity of 3
(req, res, next)
:whereas express.io expects middleware functions to have an arity of 2
(data, next)
:Is there any way to use express.js middleware in express.io?