Fastify Videos

Workshop recording: Get Started with Fastify

< 1 min read

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 package.json
  • Setting type to module to tell Node.js that we’re using ECMAScript modules, using import / export syntax
  • start:dev npm run script, using nodemon for restarting the application
  • start npm run script, will be run when we run nodemon
  • dependencies and devDependencies
  • Show empty server.js
  • 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!