---
title: "Fastify"
description: "1 posts about Fastify, summarised, each linking to the original."
---

# Fastify
> 1 posts about Fastify, summarised, each linking to the original.

## Articles

### [Build Well-Documented and Authenticated APIs in Node.js with Fastify](https://yomu.fyi/post/build-well-documented-and-authenticated-apis-in-node-js-with-fastify.md)
- Company: [Heroku](https://yomu.fyi/company/heroku.md)
- Author: Julián Duque
- Published: Apr 29, 2024
- Type: Tutorial

This walkthrough builds and deploys a Node.js API with Fastify, covering a public directory endpoint and a JWT-protected profile endpoint backed by Heroku Postgres. It uses Fastify’s plugin architecture, including a custom database plugin that reads DATABASE\_URL, creates a PostgreSQL pool, and decorates the server with db.query; @fastify/autoload registers plugins from the plugins directory. Authentication uses a JWT signed with an RSA256 private key, while the public key validates requests, and Fastify Swagger plugins generate an OpenAPI specification and UI that Postman can import as an API client. After local testing, the project seeds 50 database records, configures the RSA public key, and deploys through Heroku CLI commands, where the /directory endpoint returns usernames and the deployed API is shown running.
