This is a skeleton TypeScript web project using Fastify, Prisma and Handlebars.
I use this for quick prototyping of side-projects and so there are a few caveats:
- You won't get any example testing setup out of the box
- The project is very opinionated to my specific needs and so will likely need to be tweaked to work for others
- Checkout the repository
- Clone the
.env.example
file to.env
adjusting for your needs - Execute
yarn
to install the dependencies - Execute
yarn prisma:generate-client
to generate a typed database client - Execute
yarn prisma:migrate-dev
to migrate and setup the development database - Execute
yarn start
to start the HTTP server
Follow the development steps except for changing step 5 to execute yarn prisma:migrate-prod
instead.
The database schema can be adjusted in src/lib/database/schema.prisma
.
After adjusting the database schema you can run:
yarn prisma:format-schema
to validate the schemayarn prisma:generate-client
to update the typed database clientyarn prisma:migrate-dev
to run the migrations
Linting can be ran with yarn lint
and will also be ran automatically pre-commit.