Skip to content

Instantly share code, notes, and snippets.

@ptantiku
Created April 30, 2018 17:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ptantiku/464c0ad78b69b59b9e2fc3ff62b1908e to your computer and use it in GitHub Desktop.
Save ptantiku/464c0ad78b69b59b9e2fc3ff62b1908e to your computer and use it in GitHub Desktop.
Create HTTPS proxy on port 3443 to proxy to port 3000
const fs = require('fs');
const httpProxy = require('http-proxy');
httpProxy.createServer({
target: {
host: 'localhost',
port: 3000
},
ssl: {
key: fs.readFileSync('./server.key'),
cert: fs.readFileSync('./server.crt')
}
}).listen(3443);
console.log('Running HTTP Proxy on port 3443 --> localhost:3000')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment