Created
April 30, 2018 17:26
-
-
Save ptantiku/464c0ad78b69b59b9e2fc3ff62b1908e to your computer and use it in GitHub Desktop.
Create HTTPS proxy on port 3443 to proxy to port 3000
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
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