Skip to content

Commit

Permalink
Merge branch 'route-http-client-security'
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Feb 12, 2010
2 parents c6a2674 + 54f1a51 commit 49cb53d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/express/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ Server = Class({

run: function(port, host, backlog){
var self = this
this.running = true
if (host !== undefined) this.host = host
if (port !== undefined) this.port = port
if (backlog !== undefined) this.backlog = backlog
Expand Down
4 changes: 3 additions & 1 deletion lib/express/dsl.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ function route(method) {
fn = options, options = {}
if (path.indexOf('http://') === 0)
return http[method].apply(this, arguments)
else
else if (!Express.server.running)
Express.routes.push(new Route(method, path, fn, options))
else
throw new Error('cannot create route ' + method.toUpperCase() + " `" + path + "' at runtime")
}
}

Expand Down

0 comments on commit 49cb53d

Please sign in to comment.