Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add SSL support

  • Loading branch information...
commit e8545f2f5c4d87db106082374f7f4843e9dad008 2 parents 2f96bee + 403ecb6
@lpatters lpatters authored
Showing with 7 additions and 3 deletions.
  1. +7 −3 lib/jsgi-node.js
View
10 lib/jsgi-node.js
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.