Cryptocurrency API Gateway using Typescript+Workers
Jun 29, 2018Steven Pack

Summary
This post introduces a custom HTTP routing and handling framework built with TypeScript for Cloudflare Workers. It defines interfaces for routers and route handlers, and implements concrete routes for API gateway functionality: ping, aggregating responses from multiple providers, selecting the fastest response (using Promise.race), and direct passthrough. The implementation demonstrates building a cryptocurrency API gateway with less than 500 lines of code, highlighting the rapid development and deployment capabilities of Workers.