This is a recording of the free Get Started With Fastify workshop that I ran on May 18th, 2021.
The code for this workshop is on GitHub:
The beginning of the workshop is missing from the video as I forgot to start recording until we were a few minutes in!
Here are my notes for those missing few minutes:
- In this workshop we’re going to be building a basic API with the Fastify framework. This will be the start of an API for a recipes app
- In the next hour we’re going to cover:
- Creating a Fastify server instance
- Adding an API route for creating new recipes
- Adding request validation to the new recipe API route
- Let’s take a look at our application’s
moduleto tell Node.js that we’re using ECMAScript modules, using
start:devnpm run script, using
nodemonfor restarting the application
startnpm run script, will be run when we run
- Show empty
- Start server with nodemon –
npm run start:dev
curl -v localhost:3000– no HTTP server
- We need to create a Fastify server instance which can listen for HTTP requests
…and the rest of the workshop is in the video!