Loading…
Topic
Fastify
1 post about Fastify. Every summary links to the original.
- 1 post
- 1 company
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
Newest first
Posts
Build Well-Documented and Authenticated APIs in Node.js with Fastify
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.
Related topics
All topics →Weekly digest
The best engineering reads, once a week.