/fastify-typescript-starter

fastify + typescript starter

Primary LanguageTypeScript


Fastify Typescript Starter

Fastify Rest API Boilerplate Using TypeScript



Features:

           

                 

How to use

1. Clone this repo & install dependencies

Install Node dependencies:

npm install

2. Create env files

Create the env files for dev, test and prod, refer env.example

.env.development.local
.env.test.local
.env.production.local

2. Set up the database

The boilerplate uses Postgres database.

and update the db credentials in the env file

3. Generate Prisma Client

Run the following command to generate Prisma Client:

npm run prisma:generate:dev

4. Migrate Schema

Run the following command to migrate Prisma Migrate

npm run prisma:migrate:dev

5. Start the server

Launch your server with this command:

npm run dev

Swagger Endpoint:

http://localhost:3001/api-docs