0

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...

CommaToast
  • 11,370
  • 7
  • 54
  • 69

1 Answers1

2

They're all available on express under the same name.

express.bodyParser == connect.bodyParser
Jonathan Ong
  • 19,927
  • 17
  • 79
  • 118
  • 1
    Then 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
  • 1
    utils 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