Skip to content

Commit

Permalink
fix ref error to http variable in start function
Browse files Browse the repository at this point in the history
  • Loading branch information
nrstott committed Jun 5, 2011
1 parent b79a575 commit 73183f4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/jsgi-node.js
Expand Up @@ -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;
};
Expand Down

0 comments on commit 73183f4

Please sign in to comment.