Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I use Express or Connect for RESTful Nodejs application

I am planning to develop a complex Node application with 30 modules which will be purely accessed thru REST services - backbone being one of the front-ends. I am not sure if I should use Express or Connect as the application does not use any views.

like image 993
Me Unagi Avatar asked Oct 07 '22 21:10

Me Unagi


1 Answers

Express gives you everything in Connect plus:

  • Views (which you don't need)
  • Routing (which you probably do need), along with support for route middleware
  • Ability to use multiple configurations (e.g. production vs. testing)
  • Settings management, making it easy to pass settings to different modules
  • Convenience methods on request objects for extracting info
  • Convenience methods on response objects for sending files, setting cookies, redirecting, etc.

It sounds like you'd benefit from the routing, configuration, and settings in particular. You might want to look into restify as an alternative.

like image 200
ebohlman Avatar answered Oct 09 '22 10:10

ebohlman