From 73183f42163084541e9b63c515d0cca55d5b3933 Mon Sep 17 00:00:00 2001 From: nrstott Date: Sat, 4 Jun 2011 19:57:05 -0500 Subject: [PATCH] fix ref error to http variable in start function --- lib/jsgi-node.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/jsgi-node.js b/lib/jsgi-node.js index bf4343f..e907f68 100644 --- a/lib/jsgi-node.js +++ b/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; };