When comparing Sails.js vs Express.io, the Slant community recommends Sails.js for most people. In the question“What are the best Meteor alternatives for realtime JS apps?” Sails.js is ranked 1st while Express.io is ranked 6th. The most important reason people chose Sails.js is:
Sails.js is built with a focus on building real time communication apps such as chat or multiplayer games, so naturally it has Socket.io extremely well supported.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Transparent support for Socket.io
Sails.js is built with a focus on building real time communication apps such as chat or multiplayer games, so naturally it has Socket.io extremely well supported.
Pro MVC architecture
This could be a huge plus, if you prefer to build your apps using the Model View Controller architecture. Using Sails.js you'll find the task of separating the business logic from the user interface and keeping the interactions between them in a separate layer, extremely easy.
Pro JSON API generated for free
Exposes public JSON API for free. No additional routing to be defined. Makes it pretty easy to access data from anywhere.
Pro ORM that can be plugged into any database, or even custom web service
Sails.js uses Waterline ORM at its backend which means you can store your data in any datastore that you like; all you have to do is make a change to the Waterline adapter, this will allow you to store your data in MySQL/Redis or any other kind of database.
Pro So easy to deploy and lift
Pro Great documentation and structure
Clear documentation and easy to understand. The file structure gives you a way to understand where you can start to develop when you encounter a new Sails project
Pro Mature
Being built from two of the oldest Node libraries where each of them has had several releases and constant bug fixes and patches means that express.io is a rather mature solution for building realtime web applications.
Pro Large userbase
Express is the most used Node.js web framework and this brings a large number of learning resources, guides, tutorials and many libraries available for it.
Pro Can easily be upgraded from an Expressjs app
Since Express.io is basically just the Express framework + socket.io, it's very easy to upgrade an express app to an express.io app.
First run: npm install express.io
Then swap require('express')
to require('express.io')
and it will run the same as before.
Cons
Con Poor ORM
The built-in Waterline is not well designed and is not suitable for production environments. Populating more than 1 level deep is a nightmare, there is no transaction support, new features/bug fixes are not implemented anywhere near a timely manner (the most requested feature 'deep populate' has been lingering in their github issues list for over a year and a half now).
Con Working with relational databases can be a hassle
Not only express, but every Node framework has this problem. While there exist plugins and libraries that allow developers to use relational databases in their web applications, they are not very good and usually it's a hassle and more trouble than it's worth to use a relational database with Node and express.