I'm new to *Hapi *framework. During development, I have to restart the hapi server whenever I made any changes to the code.
For the view part, I can add an option {isCached: false}
to make the view read the latest html file every time. However, is there an easy setting to make it reload code automatically whenever it is changed?
UPDATE:
Thanks to dylants' suggestion, Nodemon works great.
However, in my app there is a selenium-standalone child process, whenever the nodemon
restarts, it will generate an error log. ...Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again...
I have tried https://github.com/remy/nodemon#controlling-shutdown-of-your-script, it doesn't help.
I've used nodemon. You just start your server with $ nodemon
instead of $ npm start
and every time you make a change to your server code it restarts the server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With