https://github.com/hmake98/fastify-typescript
Fastify typescript boilerplate with Prisma
https://github.com/hmake98/fastify-typescript
docker fastify fastify-boilerplate fastify-prisma prisma
Last synced: 10 months ago
JSON representation
Fastify typescript boilerplate with Prisma
- Host: GitHub
- URL: https://github.com/hmake98/fastify-typescript
- Owner: hmake98
- License: mit
- Created: 2020-12-26T09:26:16.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-07-16T07:11:24.000Z (over 1 year ago)
- Last Synced: 2025-03-31T10:03:39.390Z (10 months ago)
- Topics: docker, fastify, fastify-boilerplate, fastify-prisma, prisma
- Language: TypeScript
- Homepage:
- Size: 404 KB
- Stars: 220
- Watchers: 2
- Forks: 37
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Fastify-Typescript
Typescript based rest-API boilerplate with prisma and fastify framework.
## How to use
### 1. Clone this repo & install dependencies
Install Node dependencies:
`npm install`
### 2. Set up the database
This uses [Postgres database](https://www.postgresql.org/).
To set up your database, run:
```sh
npm run migrate
```
for production
```sh
npm run migrate:prod
```
### 3. Generate Prisma Client (type-safe database client)
Run the following command to generate [Prisma Client](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/generating-prisma-client):
```sh
npm run db:gen
```
### 4. Start the Fastify server
Launch your Fastify server with this command:
```sh
npm run dev
```
## For Build Generation
Build server with command:
```sh
npm run build
```
## Prisma documentation
- Check out the [Prisma docs](https://www.prisma.io/docs/)
- Check out the [Fastify docs](https://www.fastify.io/docs/latest/)