Skip to content

Commit ef888de

Browse files
committed
Added connect-livereload snippet
1 parent 35a6998 commit ef888de

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

Diff for: readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ grunt server:dist
4343

4444
### Livereload
4545

46-
`grunt server` will watch client files in `app/`, and server files inside `lib/`, restarting the Express server when a change is detected. This requires the [Livereload plugin](https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei) or equivalant to refresh your browser. Be sure that the plugin is enabled on the page you're testing.
46+
`grunt server` will watch client files in `app/`, and server files inside `lib/`, restarting the Express server when a change is detected.
4747

4848
### Deployment
4949

Diff for: templates/common/_package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
"load-grunt-tasks": "~0.2.0",
3131
"time-grunt": "~0.2.1",
3232
"grunt-express-server": "~0.4.5",
33-
"grunt-open": "~0.2.0"
33+
"grunt-open": "~0.2.0",
34+
"connect-livereload": "~0.3.0"
3435
},
3536
"engines": {
3637
"node": ">=0.8.0"

Diff for: templates/express/server.js

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ app.configure(function(){
3131
});
3232

3333
app.configure('development', function(){
34+
app.use(require('connect-livereload')());
3435
app.use(express.static(path.join(__dirname, '.tmp')));
3536
app.use(express.static(path.join(__dirname, 'app')));
3637
app.use(express.errorHandler());

0 commit comments

Comments
 (0)