Tools | |
---|---|
Nest JS | https://nestjs.com |
Prisma ORM | https://www.prisma.io |
Swagger | https://swagger.io |
Compodoc | https://compodoc.app |
etc |
- administrator
https://github.com/qrizan/react-shadcn-redux
- user and public
https://github.com/qrizan/nextjs-chakra-reactquery
cd nestjs-swagger-prisma
pnpm install
- generate secret key
openssl rand -base64 32
- jwt config file
src/utils/jwt.config.ts
export const jwtConfig = {
secret: '<JWT_SECRET_KEY>'
};
copy .env.example .env
example
DATABASE_URL="postgresql://johndoe:randompassword@localhost:5432/mydb?schema=public"
pnpm prisma generate
pnpm prisma migrate dev --name init
- example data
prisma/seed.ts
- running seed
npx prisma db seed
pnpm start:dev
check URL: http://localhost:3000
- open prisma studio
npx prisma studio
check URL: http://localhost:5555/
check URL: http://localhost:3000/openapi#/
- generate documentation
npx @compodoc/compodoc -p tsconfig.json -s
check URL: http://127.0.0.1:8080