Nodejs not working with https

When I launch my express app with https, the https request is not processed, but the HTTP request works correctly:

var https = require("https");
var http = require("http");
var express = require("express");
var app = express();
app.get(....)
...
app.post(...)

http.createServer(app).listen(80);
https.createServer({key: privateKey, cert: certificate},app).listen(443);

Have someone experience using express with https

+4
source share

All Articles