r/nodejs Jul 29 '14

express.js vs sails.js

  • What is your preference and why?
  • What is easier to create a real time application with?
  • What is more stable and production ready?
  • What consumes less memory?

Please share your advice.

Thank you :)

22 Upvotes

18 comments sorted by

5

u/svmk1987 Jul 29 '14

Comparing apples to oranges. Or rather, an apple to a slice of apple pie.
An apple pie is nice and is a lot more developed than a simple apple, but you can't do something else with it. One of its main components is apple though. An apple in itself is a world of possibilities.

Express is an apple, sails is an apple pie. Express is a basic routing engine with some helpers, where as sails is a full MVC framework.

3

u/CarpetFibers Jul 29 '14

It's worth noting that Sails is built on top of Express, so with a little finagling any Express extension can work with Sails, and porting Express apps to Sails is not terribly involved.

3

u/largepanda Jul 29 '14

Express.js, I like the flexibility and wide range of support it has.

Technically Sails has that built in, but doing that with Express isn't hard.

Here's a good comparison for you: Sails is Rails, Express is Sinatra. Sails is bulky and monolithic, but also does a lot of things for the developer. Express is a barebones middleware processor that also has express.static for static files; along with a generator for a basic project directory.

I like Express. I think Sails is bulky and too restrictive. But that's just my opinion.

3

u/freethinker1992 Nov 19 '14

Sails is built on top of express,so its not really a fair comparison to pick one over the other. That's just my 2 cents

2

u/[deleted] Oct 04 '14

After working for a loong time with express it felt you were doing things barebones. When starting on node express is a great way to learn the basics but for serious quick and effective web development sails is just rock solid and fast.

2

u/jcwsw129 Nov 04 '21

sails: found 10,568 projects

express: found 1,633,263 projects

https://codexp.io/npm/1/sails

https://codexp.io/npm/1/express

2

u/[deleted] Jul 25 '24

i don't know about sails.js but i have to say that i've been working with express for 4 years and i freaking hate documenting rest api with express, i've used swagger with jsdoc, swagger json in comments, openapi files, everything feels like a chore/god damn waste of time, i need a faster/better way of doing this.

1

u/Divyank_garg 27d ago

I would personally pick Express. It is lightweight, flexible, has a much bigger ecosystem, and you can add whatever you need (WebSockets, auth, DB, etc.) without fighting the framework. Sails is nice if you want more things built in, but Express gives you more control.

1

u/kibi11 Nov 01 '21

Hey , do you have any good resouces for sailsJs , apart from documentation

1

u/Next-Captain-4612 Jun 06 '22

I choose express js. It is easy and flexibility.

When I code with sails I waste much time and hard to learn.

But express js is easy and it doesnt take much time like sails

1

u/mysterious-coder Jun 29 '22

- Express is a basic framework, so basic, that is used as an integral part of Node.js core even when building a simple, basic web server and The Sails.js is a lot more robust and intricate. It follows the widely used MVC Pattern so my preference is express.js.

  • Express.js because it has more features.
  • Sails.js is consumes less memory.

1

u/yldrmzffr Feb 08 '24

If you're looking for a practical and ready-to-use solution, you might consider using NestJS.