Closed chrismcclellan closed 11 years ago
sails lift
by default will watch for changes (though it's possibly hitting the watcher debounce), alternatively you can run grunt default
to get just the grunt watcher.
Duplicate of #366 Workaround: .foreverignore file
**/.tmp/**
:+1: this goes for using supervisor as well.
Will sails lift
watch changes to .coffee
files? Mine doesn't seem to be restarting.
Mine isn't restarting either. Obviously the ejs stuff it auto reloads on the fly. But not the js stuff.
Maybe this could be made more clear as to what exactly its watching? I'd love to be able to throw out supervisor/nodemon etc.
@mikermcneil @Zolmeister
Please give any solution for live code update without restart.... i cant start to develop the application without get solution for this.
I've used nodemon https://github.com/remy/nodemon. You can place a .nodemonignore file in the root folder and put /.tmp/* in it. Worked out pretty well.
@robertmerten is it working with version 0.9.7 ?
@phpbala Hm, using version 0.9.4. Don't know if something has changed. Did you test with nodemon?
@robertmerten .. Hi, I have installed nodemon and then followed your steps (created .nodemonignore file and added /.tmp/* code). is there anything i have to do?
@phpbala Start the app with "nodemon app.js" and it should work. Nodemon tells you which file caused a reload so have a look at the terminal if you have any issues. You can post it here and I can try to see what's going wrong. Just to make sure that I understand the issue: You want the nodejs server to reload but no Live Reload ( automatic browser restart )
Hi @robertmerten : This is what i am getting.....
Balaphp:hangman balaganesh$ nodemon app.js
4 Nov 21:21:26 - [nodemon] v0.7.10
4 Nov 21:21:26 - [nodemon] to restart at any time, enter rs
4 Nov 21:21:26 - [nodemon] watching: /Users/balaganesh/Sites/hangman
4 Nov 21:21:26 - [nodemon] starting node app.js
4 Nov 21:21:26 - [nodemon] reading ignore list
module.js:340
throw err;
^
Error: Cannot find module 'sails'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.
Your app.js
file attempts to lift the Sails installed in your project's local node_modules
directory, which by default doesn't exist for projects created with sails new
. If you want to start your app with node app.js
(or nodemon app.js
), you'll need to install Sails locally for your application by either doing npm install sails
in your app directory or symlinking node_modules/sails
to your global Sails folder.
That should do it :)
Cheers and thanks.... its working now... Thanks @sgress454 and @robertmerten.....:-)....
Running
forever -w start app.js
causes infinite restarting by files being changed in /.tmp