Lesson 2 / 30
Installation & Setup
Get Fastify installed and create your first project.
npm install fastify
Start with a Node project, then add Fastify as a dependency.
mkdir my-fastify-api && cd my-fastify-api
npm init -y
npm install fastifyEnable ESM
Add "type": "module" to package.json to use modern ES6 imports instead of CommonJS.
TypeScript support (optional)
Fastify has excellent TypeScript support out of the box.
npm install --save-dev typescript ts-node @types/node