Member-only story
Sails.js in the Past
Sails.js is a Node.js MVC framework that I have used for several projects in the past. In these projects, it served as the API backend, with the front-end taken care by either EJS views or a mobile app built with PhoneGap. Build processes are handled via Grunt.
The Present
After a two years break, I returned to Sails.js for a project involving a React front-end. Much has happened in the front-end landscape in these two years.
The Front-End Landscape
Most prominently, the rise of front-end frameworks such as React, Angular, and Vue. This is accompanied by the rise of new build tools, especially Webpack, which has relegated Grunt which Sails.js is using to a secondary role of a task runner which is not often used.
Often when uses a front-end framework in production, the build is served from a web server such as Nginx or Apache, or from a Content Distribution Network (CDN). In this most frequent case, the views provided by Sails.js will not be used. Moreover, the front-end developers do not need the Grunt used by Sails.js.
Sails.js Internals
The framework has certainly being improved to use Node.js Async
and await
. So on the face of it, you still have all the Sails.js advantages, such as the unified handling of HTTP and socket endpoints, and the Waterline ORM.
But as I was diving into my code, I noticed that as the Sails.js team has been working on their Machines…