Comparing version 2.0.0 to 2.1.0
17
index.js
@@ -66,8 +66,17 @@ /* | ||
_self.start = function() { | ||
var port = options["port"] || 80; | ||
_self.app.listen(port); | ||
var port = options["port"] || (!options["ssl"] ? 80 : 443); | ||
if (options["ssl"]) { | ||
var https = require("https"); | ||
var fs = require("fs"); | ||
var config = { | ||
key: fs.readFileSync(options["sslKeyFile"]), | ||
cert: fs.readFileSync(options["sslCertFile"]) | ||
}; | ||
https.createServer(config, _self.app).listen(port); | ||
} else { | ||
_self.app.listen(port); | ||
} | ||
return port; | ||
// return 0; | ||
} | ||
} | ||
} |
{ | ||
"name": "yans", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Yet Another Node Server", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3468
69
1
1