Skip to content

Commit

Permalink
add ssl support
Browse files Browse the repository at this point in the history
  • Loading branch information
nrstott committed Jun 5, 2011
2 parents 2f96bee + 403ecb6 commit 0677b9f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/jsgi-node.js
Expand Up @@ -234,9 +234,13 @@ function start( app, options ) {

var port = options.port || 8080;

var http = require( "http" ).createServer( app );
http.listen( port );
if ( options.ssl ) {
require( "https" ).createServer( options.ssl, app ).listen( port );
} else {
require( "http" ).createServer( app ).listen( port );
}

sys.puts( "Server running on port " + port );
return http;
};
module.exports = start;
module.exports = start;

0 comments on commit 0677b9f

Please sign in to comment.