Search code examples
node.jsexpressnode.js-connect

nodejs express 3.0


I have a nodejs express 2.0 application and I want to use express 3.0 within it. Tell me please which is state of express 3.0 at now and is there examples of express 3.0 applications?

I saw connect 2.0 has been released, so can I use it with express 2.0 ?


Solution

  • I have had the same issue myself with my applications after doing npm install express .

    TJ has upgraded version 3 and added/removed some features (better or for worse Im still ascertaining :P )

    But the 2 things you need to MAKE sure to change on a default application is change:

    app.register..

    to:

    app.engine

    And to know that dynamicHelpers and helpers are no longer there. You have to use

    app.locals.use

    Strongly recommend reading his migration guide:

    https://github.com/visionmedia/express/wiki/Migrating-from-2.x-to-3.x

    TJ has had some of his examples updated (and in the process of updating others) which I found a good helper to picking it back up

    https://github.com/visionmedia/express/