{"id":18794506,"url":"https://github.com/chainstacklabs/express-proxy-server","last_synced_at":"2026-04-11T19:02:37.317Z","repository":{"id":145844232,"uuid":"607091815","full_name":"chainstacklabs/express-proxy-server","owner":"chainstacklabs","description":"This project is a simple express.js proxy server to send post requests to a blockchain using the web3.js library, hiding your endpoint URL","archived":false,"fork":false,"pushed_at":"2024-04-10T11:04:22.000Z","size":600,"stargazers_count":2,"open_issues_count":7,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-21T16:12:54.697Z","etag":null,"topics":["blockchain","ethereum","expressjs","nodejs","rpc-provider"],"latest_commit_sha":null,"homepage":"https://docs.chainstack.com/docs/how-to-store-your-web3-dapp-secrets-guide-to-environment-variables","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chainstacklabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-27T09:46:48.000Z","updated_at":"2024-10-30T09:13:32.000Z","dependencies_parsed_at":"2024-08-03T14:31:14.423Z","dependency_job_id":null,"html_url":"https://github.com/chainstacklabs/express-proxy-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chainstacklabs/express-proxy-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainstacklabs%2Fexpress-proxy-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainstacklabs%2Fexpress-proxy-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainstacklabs%2Fexpress-proxy-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainstacklabs%2Fexpress-proxy-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chainstacklabs","download_url":"https://codeload.github.com/chainstacklabs/express-proxy-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainstacklabs%2Fexpress-proxy-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31691503,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T13:07:20.380Z","status":"ssl_error","status_checked_at":"2026-04-11T13:06:47.903Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","ethereum","expressjs","nodejs","rpc-provider"],"created_at":"2024-11-07T21:29:38.155Z","updated_at":"2026-04-11T19:02:37.255Z","avatar_url":"https://github.com/chainstacklabs.png","language":"JavaScript","readme":"\u003cimg width=\"1200\" alt=\"Labs\" src=\"https://user-images.githubusercontent.com/99700157/213291931-5a822628-5b8a-4768-980d-65f324985d32.png\"\u003e\n\n\u003cp\u003e\n \u003ch3 align=\"center\"\u003eChainstack is the leading suite of services connecting developers with Web3 infrastructure\u003c/h3\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca target=\"_blank\" href=\"https://chainstack.com/build-better-with-ethereum/\"\u003e\u003cimg src=\"https://github.com/soos3d/blockchain-badges/blob/main/protocols_badges/Ethereum.svg\" /\u003e\u003c/a\u003e\u0026nbsp;  \n  \u003ca target=\"_blank\" href=\"https://chainstack.com/build-better-with-bnb-smart-chain/\"\u003e\u003cimg src=\"https://github.com/soos3d/blockchain-badges/blob/main/protocols_badges/BNB.svg\" /\u003e\u003c/a\u003e\u0026nbsp;\n  \u003ca target=\"_blank\" href=\"https://chainstack.com/build-better-with-polygon/\"\u003e\u003cimg src=\"https://github.com/soos3d/blockchain-badges/blob/main/protocols_badges/Polygon.svg\" /\u003e\u003c/a\u003e\u0026nbsp;\n  \u003ca target=\"_blank\" href=\"https://chainstack.com/build-better-with-avalanche/\"\u003e\u003cimg src=\"https://github.com/soos3d/blockchain-badges/blob/main/protocols_badges/Avalanche.svg\" /\u003e\u003c/a\u003e\u0026nbsp;\n  \u003ca target=\"_blank\" href=\"https://chainstack.com/build-better-with-fantom/\"\u003e\u003cimg src=\"https://github.com/soos3d/blockchain-badges/blob/main/protocols_badges/Fantom.svg\" /\u003e\u003c/a\u003e\u0026nbsp;\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  • \u003ca target=\"_blank\" href=\"https://chainstack.com/\"\u003eHomepage\u003c/a\u003e •\n  \u003ca target=\"_blank\" href=\"https://chainstack.com/protocols/\"\u003eSupported protocols\u003c/a\u003e •\n  \u003ca target=\"_blank\" href=\"https://chainstack.com/blog/\"\u003eChainstack blog\u003c/a\u003e •\n  \u003ca target=\"_blank\" href=\"https://docs.chainstack.com/quickstart/\"\u003eChainstack docs\u003c/a\u003e •\n  \u003ca target=\"_blank\" href=\"https://docs.chainstack.com/quickstart/\"\u003eBlockchain API reference\u003c/a\u003e •\n  \u003ca target=\"_blank\" href=\"https://console.chainstack.com/user/account/create\"\u003eStart for free\u003c/a\u003e •\n\u003c/p\u003e\n\n# Proxy server for RPC endpoint using Express\n\nThis project shows how to protect your RPC URL by creating a back-end server where you store the endpoint. Then, when you click the button to check the balance, the front end will send a request to the back-end server using the `eth_getBalance` method via the `web3.js` library. \n\nRead the full guide on the Chainstack developer portal:\n* [How to store your Web3 DApp secrets: Guide to environment variables](https://docs.chainstack.com/docs/how-to-store-your-web3-dapp-secrets-guide-to-environment-variables)\n\n## Project details\n\nFor this use case, we built a simple app that allows you to input an Ethereum address and returns the address balance by sending an `eth_getBalance` request to an Ethereum node.\n\nIt is built using the `Express.js` framework, and the main server code is in the `index.js` file that you can find in the root directory.\n\n## Quickstart\n\nClone the repository:\n\n```sh\ngit clone https://github.com/soos3d/node-proxy-server-to-protect-your-rpc-url-endpoint.git\n```\n\nEdit the `.env.sample` file to include your node RPC URL key and rename it to `.env`.\n\n```env\nETHEREUM_RPC_URL=\"YOUR_CHAINSTACK_NODE_URL\"\n```\n\nInstall  dependencies:\n\n```sh\nnpm install\n```\n\nRun the server in dev mode with:\n\n```sh\nnpm run dev\n```\n\nThe server is now running on `http://localhost:4000/`. You can send balance requests to your server with the following:\n\n```sh\ncurl --location 'http://localhost:4000/balance' \\\n--header 'Content-Type: application/json' \\\n--data '{\"address\":\"0xc457C11e2d7b6Ed68516CdED897c2Ab9F41e022C\"}'\n```\n\nYou will also find a basic front end in the `src` directory. You can run it in your browser and test the proxy server.\n\n1. Insert the address you want to query in the input field.\n1. Click **Check balance** to send a request to your RPC node and retrieve the address' balance.\n\nIf you check the source code from the browser, you won't be able to find the API key used! \n\n## Prerequisites\n\n* Node.js: ^16.17.0— [install Node](https://nodejs.org/en/download/)\n* A node RPC endpoint.\n\nDeploy a node with Chainstack:\n\n1. [Sign up with Chainstack](https://console.chainstack.com/user/account/create).  \n1. [Deploy a node](https://docs.chainstack.com/platform/join-a-public-network).  \n1. [View node access and credentials](https://docs.chainstack.com/platform/view-node-access-and-credentials). \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainstacklabs%2Fexpress-proxy-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchainstacklabs%2Fexpress-proxy-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainstacklabs%2Fexpress-proxy-server/lists"}