Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do I have to restart/lift Sails each time I make changes to a controller?

Tags:

sails.js

In my current workflow, after I make changes to controllers in a Sails project, I have to restart the Sails to pick up the changes. Is there any way around this so that they can be picked up without a restart? (I understand that sails has to generate routes for the actions that I define in controllers during a startup (among other things), but I would like to know what I am missing)

like image 407
Nihat Avatar asked Jan 10 '15 22:01

Nihat


1 Answers

As of Sails v0.11, you can use the autoreload hook to get Sails to autoreload (without requiring a restart) whenever a controller, model, or service is updated.

This has the advantage that you can build the behaviour into your app and launch it with sails lift, as usual, rather than having to remember to launch it in a non-standard way.

like image 195
Nick F Avatar answered Jan 02 '23 22:01

Nick F