Check if the LiveReload browser extension icon is well activated, in Firefox the icon comes green, in Chrome the small dot inside the circle becomes. We launch the Grunt watch to monitor our files changes. It'll use the 'json spaces' configuration to prettify it. Run grunt clean, grunt less, grunt execute (sometimes magento doesn't work well with livereload if it has not been executed before) and then. My node app is created on port 8080, this is a simplified version of my server.js file: var env = _ENVĪpp.set('port', || 8080) Īpp.engine('jade', require('jade')._express)Īpp.use(express.static(_dirname + '/www', ) For the watch and livereload, you need to specify which files to watch, and what tasks to execute in your Gruntfile, again, take a look at this sample Gruntfile. Following this great article on how to use npm as a build tool, I would like to implement it when building a nodejs express web app.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |