For easier Node.js development, tools like nodemon are great, but how do we use it on Nitrous.io?
- Install using npm:
$ npm install -g nodemon
- Run app with
$ nodemon -L myapp.js rather than
$ node myapp.js
- Monitor multiple directories:
$ nodemon -L --watch ~/workspace/mylib --watch libs app/server.js
The trick, as pointed out by the helpful support team at Nitrous.io, is that their filesystem does not yet fully support the
inotify interface, which
nodemon use to detect changes. Fortunately, nodemon's author @remy thought of this and provided a legacy flag
-L, which allows it to work on Nitrous.io.
What are you talking about?
nodemon is an "app wrapper" that monitors file changes in your Node.js project to automatically restart the node server. Very flexible, can monitor single files or multiple directories. Only change to your development process is to start a node app with the console command
$ nodemon myfile.js rather than
Nitrous.io is a web-based development IDE+environment (development-as-a-service? DaaS?) that lets you write and deploy code (Ruby, Node.js, Django, Go) in an actual environment, all from your browser.