Skip to content

Commit

Permalink
Merge 8300c66 into a5b5603
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianl committed Jan 6, 2018
2 parents a5b5603 + 8300c66 commit 07b5b7c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/server/utils.js
Expand Up @@ -93,6 +93,11 @@ var serverUtils = {
options.get("httpModule") === "http2"
) {
var opts = serverUtils.getHttpsOptions(options);

if (parseInt(process.versions.node.split(".")[0]) >= 9) {
return httpModule.createSecureServer(opts.toJS(), app);
}

return httpModule.createServer(opts.toJS(), app);
}

Expand All @@ -107,6 +112,11 @@ var serverUtils = {
* require lookup.
*/
var httpModule = options.get("httpModule");

if (httpModule === "http2" &&
parseInt(process.versions.node.split(".")[0]) >= 9) {
return require("http2");
}

if (typeof httpModule === "string") {
/**
Expand Down

0 comments on commit 07b5b7c

Please sign in to comment.