Keystone-classic: Restart the server on code change

Created on 2 Apr 2014  Â·  1Comment  Â·  Source: keystonejs/keystone-classic

When in development mode, the server should restart automatically when files are changed – that speeds up development significantly.

chokidar is good base for such feature.

Most helpful comment

I feel this is something best left to the developer to choose, rather than including the functionality in Keystone.

There are several packages that solve this well - my personal favourite being nodemon

Just npm install -g nodemon then use nodemon keystone to start your app instead of node keystone.

Forever is also a great tool to use when you want a script to automatically restart if it crashes, and you use it the same way - forever start keystone.js. We use this for our servers (when not hosting on a PAAS like Heroku that does it for you)

>All comments

I feel this is something best left to the developer to choose, rather than including the functionality in Keystone.

There are several packages that solve this well - my personal favourite being nodemon

Just npm install -g nodemon then use nodemon keystone to start your app instead of node keystone.

Forever is also a great tool to use when you want a script to automatically restart if it crashes, and you use it the same way - forever start keystone.js. We use this for our servers (when not hosting on a PAAS like Heroku that does it for you)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

celiao picture celiao  Â·  4Comments

rigalpatel001 picture rigalpatel001  Â·  5Comments

Twansparant picture Twansparant  Â·  5Comments

kamontat picture kamontat  Â·  5Comments

zhdan88vadim picture zhdan88vadim  Â·  5Comments