But one thing that bugs me while playing around with Sails.js is stopping/starting the server every time I made changes to my controller. It’s proven to be annoying by far especially coming from PHP frameworks, Ruby on Rails, Mojolicious, etc… The changes would take place if you’re editing the view files but nothing else.
The solution to all this madness is to use nodemon.
It’s easy. Install using npm like so
npm install nodemon or sudo npm install nodemon
Add a nodemanignore file to your folder called .nodemonignore and add this inside of it
Then cd or go into your sails project and run this command
nodemon app or sudo nodemon app
That should start you server while nodeman monitors your changes.
And that should be it!
The only thing that annoys me is this error through the console
Hook failed to load: orm (Error: ER_DUP_FIELDNAME: Duplicate column name '_waterline_dummy02492')
I found out on stackoverflow that you can get rid of it by deleting it from your tables. But it keeps coming back. Hopefully they’ll get it fixed. Other than that I’m back to coding without restarting my server.