ericf / express-handlebars

A Handlebars view engine for Express which doesn't suck.
BSD 3-Clause "New" or "Revised" License
2.31k stars 382 forks source link

Getting this to work with livereload #116

Closed jme783 closed 9 years ago

jme783 commented 9 years ago

Hi there!

Thanks for the library, super awesome! I was wondering if there was a way to get this working with live reload to avoid having to stop/restart the server every time a .hbs file changes. Currently, I'm using Grunt and would love to trigger livereload based on when a handlebars file changes.

Thanks!

Jeff

ericf commented 9 years ago

When the node process and Express app are in development mode (which is is by default), the templates are always loaded from disk every request. So it sounds like you'll want to setup your live reload config to only refresh the browser when a template changes, but not restart the server since that won't be necessary.

jme783 commented 9 years ago

Oh awesome, thanks @ericf appreciate the answer. I'll close out the ticket.