I am new to both Sails and grunt so I might be missing the obvious. I am trying to automatically refresh my sails app in the browser whenever files change.
I start the app with sails lift
and it runs on the default port 1337
.
I tried adding options: {livereload:true}
to my grunt-contrib-watch
configuration but as far as I understand I need to somehow inject the livereload JavaScript into my page?
I tried to use grunt-contrib-connect
with the livereload
option to inject the JavaScript but it seems to just start another server. When I navigate to the started server (localhost:8000
) I just see the folder structure. The livereload JavaScript is injected however.
I want to avoid the livereload Chrome Plugin if possible.
What's the best way to inject the livereload JavaScript into my Sails app? Or should I just use another tool like Browsersync?
Thank you! :)