Skip to content

Commit

Permalink
Merge pull request #14 from jeef3/connect-livereload
Browse files Browse the repository at this point in the history
feat(app): Added connect-livereload snippet that removes need for LiveReload plug-in.
  • Loading branch information
DaftMonk committed Nov 20, 2013
2 parents 35a6998 + ef888de commit 56332de
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ grunt server:dist

### Livereload

`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.
`grunt server` will watch client files in `app/`, and server files inside `lib/`, restarting the Express server when a change is detected.

### Deployment

Expand Down
3 changes: 2 additions & 1 deletion templates/common/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"load-grunt-tasks": "~0.2.0",
"time-grunt": "~0.2.1",
"grunt-express-server": "~0.4.5",
"grunt-open": "~0.2.0"
"grunt-open": "~0.2.0",
"connect-livereload": "~0.3.0"
},
"engines": {
"node": ">=0.8.0"
Expand Down
1 change: 1 addition & 0 deletions templates/express/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ app.configure(function(){
});

app.configure('development', function(){
app.use(require('connect-livereload')());
app.use(express.static(path.join(__dirname, '.tmp')));
app.use(express.static(path.join(__dirname, 'app')));
app.use(express.errorHandler());
Expand Down

0 comments on commit 56332de

Please sign in to comment.