Sails.js + Passport.js : req.user undefined

Sails.js is a popular express based MVC framework that has been gaining popularity these past few years. Passport.js is used for user authentication purposes. Recently, i was working on one of my projects that involved these two and i came upon a very weird issue which took me a few …

Sails Model.destroy() fails

A few days ago i ran into an issue where i was getting the following error running destroy() on a MySql database table.

Investigating further, i came to know that the table in question by chance did not have a primary key. Looking into the destroy function in the sails-mysql adapter, I figured out the reason …

Integrating Angular (4) with Sails.js

Update #6 April 13, 2017: I have updated this post as well as the sample code repo to use Angular 4.0.2. Update #5 November 23, 2016: I have updated this post as well as the sample code repo to use Angular 2.2.1. Update #4 September 23, 2016: I have updated this post as well as the sample code repo to use Angular 2.0.0. Update #3 September 4, 2016: I have …