Skip to content

Commit

Permalink
adds projectPath to the callback context. Closes sintaxi#506
Browse files Browse the repository at this point in the history
  • Loading branch information
sintaxi committed Nov 20, 2015
1 parent bcd6809 commit d1cc33d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ exports.server = function(dirPath, options, callback){
app.use(middleware.poly)
app.use(middleware.process)
app.use(middleware.fallback)
app.listen(options.port || 9966, options.ip, callback)

return app
return app.listen(options.port || 9966, options.ip, function(){
app.projectPath = dirPath
callback.apply(app, arguments)
})
}


Expand Down

0 comments on commit d1cc33d

Please sign in to comment.