Most API books teach you to consume them, or build them. This one does both — starting from scratch, ending with production-quality code you understand completely.
Part One builds a JavaScript client for the GitHub REST API across 23 chapters. You start with a single `fetch()` call and add one capability per chapter: authentication, pagination, rate limit handling, retries with exponential backoff, HTTP caching, concurrent requests with Promise.all, OAuth 2.0, XML feeds, and webhook receivers. JavaScript is async by nature, so the client uses async/await from chapter four onwards — there is no "add async later" chapter. By the end, the client is packaged as a GitHub Actions health tracker: a real, deployable tool that collects repository metrics and reports them to your own server.
Part Two builds the health tracker server with Fastify across 22 more chapters, using the same incremental approach. Zod data validation, a SQLite database with Prisma, JWT authentication, rate limiting, pagination with Link headers, API versioning, OAuth 2.0 login so multiple teams can connect their GitHub organizations, outgoing webhook dispatch, Prometheus metrics, and graceful shutdown. In the final chapter, the Action from Part One authenticates via OAuth and posts health reports to the server from Part Two.
The book uses one running example throughout — the GitHub API — rather than switching between unrelated services. Every technique is demonstrated against something real. Core sections move quickly and cover everything you need; Dig Deeper sections go further for readers who want to understand the why. Three exercises per chapter, including one genuine challenge, push you to apply what you learned rather than just follow along.
What you'll build:
- A production-quality GitHub API client with authentication, pagination, rate limit tracking, retries, conditional caching, concurrent requests via Promise.all, and OAuth 2.0 — packaged as a deployable GitHub Actions workflow
- A Fastify server with full CRUD, Zod validation, Prisma + SQLite, JWT authentication, GitHub OAuth login, rate limiting, webhook dispatch, Prometheus metrics, and graceful shutdown
- A test suite for both halves, using Node.js's built-in `node:test` runner and Fastify's inject() method — no external test framework required
Technologies covered: Node.js 18+, built-in fetch, Fastify v4, Zod, Prisma, SQLite, jsonwebtoken, pino, and the OpenAPI specification.
The complete source code for every chapter is freely available on GitHub at https://github.com/jfrancis42/api-book-javascript-src.
Procurando Async by Default: Crafting REST API Clients and Servers in Javascript? Aqui você encontra tudo sobre este livro de George Jeffrey Francis. Nesta página estão a descrição da obra, os detalhes da edição (317 páginas) e os formatos disponíveis para baixar: pdf, ibook, epub, kindle. Se você gosta de Livros Internacionais, Computação, Informática e Mídias Digitais, Programação, JavaScript, explore também outros títulos da mesma categoria no Porto do livro Português. Veja ainda as outras obras de George Jeffrey Francis em nosso catálogo.
Autores populares
Icon Group International (285) Publishing lmgdaw (262) Nikolay Krechet (164) Kennie B Journals (112) Riddler Books (98) Charles Nehme (95) webmarbook design (95) Mint and Cherry Notebooks (79) Iwona Makara (76) Mary Hirose (75) NAK Legal Publishing (74) Jillo Trukudo (73) Just Visualize It (69) Quick Witted Coconut (67) Talor Press (67) matlasor Sticker's (64) Miller Sye (63) Moonpeak Library (63) Ondrej Sarek (63) Roggie Clark (63)Principais publicadores
Forgotten Books Independently published Routledge Dover Publications CRC Press Taschen Princeton University Press Wiley Oxford University Press Springer Cambridge University Press Kessinger Publishing Thames & Hudson Gale, U.S. Supreme Court Records Bloomsbury Academic O'Reilly Media Rizzoli International Publications Hal Leonard Publishing Corporation Tuttle Publishing Editorial Tirant lo Blanch