Just a quick example I've thrown together for a blog post. This is aimed at giving you a feel how easy it is to get up and running with Fastify. For the sake of the example I've used Postgres.
Get set up with a .env file if you need to override the defaults:
PGUSER=myusername
PGPASSWORD=mypassword
PGDATABASE=mydatabase
Then run:
npm i
npm run dev
I've used node 20 for this example.