Permalink
Browse files

fix ref error to http variable in start function

  • Loading branch information...
1 parent b79a575 commit 73183f42163084541e9b63c515d0cca55d5b3933 @nrstott nrstott committed Jun 5, 2011
Showing with 6 additions and 3 deletions.
  1. +6 −3 lib/jsgi-node.js
View
9 lib/jsgi-node.js
@@ -232,14 +232,17 @@ function start( app, options ) {
app = new Listener( app );
options = options || {};
- var port = options.port || 8080;
+ var port = options.port || 8080,
+ http;
if ( options.ssl ) {
- require( "https" ).createServer( options.ssl, app ).listen( port );
+ http = require( "https" ).createServer( options.ssl, app );
} else {
- require( "http" ).createServer( app ).listen( port );
+ http = require( "http" ).createServer( app );
}
+ http.listen( port );
+
sys.puts( "Server running on port " + port );
return http;
};

0 comments on commit 73183f4

Please sign in to comment.