A lightweight Cloudflare Snippet that automatically selects the healthiest Steem RPC node, ensuring stable, low-latency JSON-RPC access.
It has been deployed live to https://api2.steemyy.com.
- Auto health-check and version validation
- CORS enabled
- Compatible with
fetchAPI - Instant failover using
Promise.any - 100% Serveless - Just need a DNS record and a Snippet (JS) in CloudFlare
- Unlimited Requests, compared to CloudFlare Workers which have a daily 100K quota for free plans.
npm install
npm run devYou would need a Pro cloudflare account. Also you would need to disable WAF (Web Access Firewall) see this post Bypassing WAF for API/RPC Node: api2.steemyy.com
Add a DNS record that points to ip 192.0.2.1 indicating no server will be routed to.
# or: npm run test
npm testnpm run coveragenpm run deployAlternatively, a quick deploy would be just to copy the index.js to the CloudFlare snippet. You would also need to add the DNS record (see above), configure the Snippet Rule e.g. (http.host eq "api2.steemyy.com") and Disable WAF (see above).
See CONTRIBUTING and CODE OF CONDUCT
If you like this and want to support me in continuous development, you can do the following:
