Permalink
Browse files

add ssl support

  • Loading branch information...
2 parents 2f96bee + 403ecb6 commit 0677b9fa6395887a57b9b2040c47aa40d9bf16ad @nrstott nrstott committed Jun 5, 2011
Showing with 7 additions and 3 deletions.
  1. +7 −3 lib/jsgi-node.js
View
@@ -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.