Async by Default: Crafting REST API Clients and Servers in Javascript baixar

Isbn 13: 9798195263201

Async by Default: Crafting REST API Clients and Servers in Javascript ibook

por

Escolha um formato:

Escolha um formato:

zip baixar
rar baixar
pdf baixar
ibook baixar
epub baixar
kindle baixar

Descrição do livro

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.

Número de páginas :317
Isbn 13 :9798195263201
Encadernação Async by Default: Crafting REST API Clients and Servers in Javascript:Capa Comum
© 2026 book-files.republic-it.online Termos e condições
Porto do livro Português, ou afiliadas. Todos os direitos reservados.