Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fabogit/fastify-prisma-zod-swagger
Fastify REST API, Prisma orm to manage db schema & migrations
https://github.com/fabogit/fastify-prisma-zod-swagger
docker-compose fastify postgresql prisma swagger typescript zod
Last synced: about 1 month ago
JSON representation
Fastify REST API, Prisma orm to manage db schema & migrations
- Host: GitHub
- URL: https://github.com/fabogit/fastify-prisma-zod-swagger
- Owner: fabogit
- Created: 2023-01-07T16:19:27.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-08T11:58:44.000Z (about 2 years ago)
- Last Synced: 2024-11-06T20:38:05.980Z (3 months ago)
- Topics: docker-compose, fastify, postgresql, prisma, swagger, typescript, zod
- Language: TypeScript
- Homepage:
- Size: 222 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fastify-prisma-zod-swagger
if there is no `package.json` file:
- `npm init -y`
- `npm i typescript`
- `npx tsc --init `
- `npm i prisma @prisma/client fastify fastify-zod zod zod-to-json-schema fastify-jwt fastify-swagger `
- `npm i -D ts-node-dev typescript @types/node`
- `npm run dev`
### Initialise prisma
`npx prisma init --datasource-provider postgresql`
### Turn your database schema into a Prisma schema
`npx prisma db pull`
### Generate prisma client
`npx prisma generate`
### Migrate the schema
`npx prisma migrate dev --name init`