Created
October 29, 2019 04:10
-
-
Save toknT/195dc5bf6d5cb6c1cb89cd424ee783bf to your computer and use it in GitHub Desktop.
rpc-proxy
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 httpProxy = require('http-proxy'); | |
const rpcPort = process.env.RPC_PORT; | |
const exportPort = process.env.EXPORT_PORT; | |
httpProxy.createProxyServer({ target: `http://127.0.0.1:${rpcPort}` }).listen(exportPort); |
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
{ | |
"name": "rpc-proxy", | |
"version": "1.0.0", | |
"description": "", | |
"main": "main.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "", | |
"license": "ISC", | |
"dependencies": { | |
"http-proxy": "^1.18.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment