Created
May 1, 2017 20:01
-
-
Save russiann/c72b4365f5bcee7bbbb1673cd459b22c to your computer and use it in GitHub Desktop.
HTTPS Proxy
This file contains hidden or 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 fs = require('fs'); | |
var http = require('http'), | |
httpProxy = require('http-proxy'); | |
httpProxy.createProxyServer( | |
{ | |
target:'http://localhost:8081', | |
ssl: { | |
key: fs.readFileSync('key.pem', 'utf8'), | |
cert: fs.readFileSync('cert.pem', 'utf8'), | |
passphrase: 'reactvr' | |
}, | |
}).listen(8000); | |
console.log('Running!'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment