Skip to content

Instantly share code, notes, and snippets.

@JoshElias
Created September 14, 2015 23:09
Show Gist options
  • Save JoshElias/1736ac436b1978421214 to your computer and use it in GitHub Desktop.
Save JoshElias/1736ac436b1978421214 to your computer and use it in GitHub Desktop.
var https = require("https");
var fs = require("fs");
var express = require("express");
var app = express();
app.get("*", function(req, res) {
res.redirect("http://localhost:3000"+req.url);
});
var options = {
key: fs.readFileSync("C:\\Users\\Sylvanas\\Desktop\\key.pem").toString(),
cert: fs.readFileSync("C:\\Users\\Sylvanas\\Desktop\\cert.pem").toString()
};
var httpsServer = https.createServer(options, app);
httpsServer.listen(443);
console.log('HTTPS proxy listening at: %s', 443);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment