I'm using Node with Express. Express has Connect kinda buried within it. How do you call Connect's various methods though? When I require Express then doing express.middleware.someconnectmiddleware fails...
Asked
Active
Viewed 300 times
0
-
`express.connectMiddleware` should be the same as `connect.connectMiddleware` – juandopazo Jan 10 '13 at 19:43
1 Answers
2
They're all available on express under the same name.
express.bodyParser == connect.bodyParser

Jonathan Ong
- 19,927
- 17
- 79
- 118
-
1Then why does app.use(express.utils); fail? Why does express.utils.parseSignedCookie(cookie, 'secret'); fail? I get "TypeError: Cannot call method 'parseSignedCookie' of undefined" – CommaToast Jan 12 '13 at 05:08
-
1utils isn't public so it's not exported. http://www.senchalabs.org/connect/. you can ask TJ about that, I would actually like that as well. – Jonathan Ong Jan 12 '13 at 09:15