Skip to content

Commit

Permalink
Allow custom watcher for serve command.
Browse files Browse the repository at this point in the history
I would like to be able to use a custom Watcher with the serve function.
I obviously could duplicate the code that exists in `lib/server.js`, but
the only tweak I would like to make is to pass a different watcher.
  • Loading branch information
rwjblue committed Apr 24, 2014
1 parent f69cb0a commit 292bbf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function serve (builder, options) {

console.log('Serving on http://' + options.host + ':' + options.port + '\n')

var watcher = new Watcher(builder)
var watcher = options.watcher || new Watcher(builder)

var app = connect().use(middleware(watcher))

Expand Down

0 comments on commit 292bbf1

Please sign in to comment.