Created
September 14, 2015 23:09
-
-
Save JoshElias/1736ac436b1978421214 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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