Redirect from HTTP to HTTPS using node.js/Express
问题 Is there any way I can change my web app to listen on HTTPS instead of HTTP. I'm using node.js/express. I need it to listen on HTTPS because I'm using geolocation, which Chrome no longer supports unless being served from a secure context such as HTTPS. This is the current './bin/www' file which currently listens on HTTP. #!/usr/bin/env node var app = require('../app'); var debug = require('debug')('myapp:server'); var http = require('http'); var port = normalizePort(process.env.PORT || '9494'