I have recently started learning nodeJS. Being a long-time coffeescript lover I naturally decided to use it along with node. Writing long-running processes with node I found myself restarting the program frequently. After a quick google I found node-supervisor. Node-supervisor simply watches the current directory for file changes and restarts your app for you automatically.
Before I started using supervisor I was using coffeescript with the --watch
option to automatically recompile my coffescripts when they changed.
So the problem is this, supervisor and the coffeescript recompiler don't play nice together.
coffee --compile --watch .
supervisor app.js
After that supervisor keeps restarting my app forever, even when there has been no changes to the source files.
So the question is this, what is your workflow for working with nodeJS and CoffeeScript?
What you are doing is some kind of redundant.
Here are some hints:
after installing CoffeeScript you have an executable called coffee
so you can do (no need to compile your coffee-script files):
coffee yourfile.coffee
how to combine this with supervisor
?
if you would have read the Readme on the Github page you would have noticed that supervisor can execute CoffeeScript files, too. All you need to do is:
supervisor yourfile.coffee
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