A progressive Node.js framework for building efficient and scalable server-side applications.
A permission-based CMS and Nest system, backend API demo.
Nest + Prisma + Postgresql + Typescript + Google Drive
$ pnpm install
# development
$ pnpm run start
# watch mode
$ pnpm run start:dev
# production mode
$ pnpm run start:prod
# unit tests
$ pnpm run test
# e2e tests
$ pnpm run test:e2e
# test coverage
$ pnpm run test:cov
- add
vercel.json
{
"version": 2,
"builds": [
{
"src": "dist/main.js",
"use": "@vercel/node"
}
],
"routes": [
{
"src": "/(.*)",
"dest": "dist/main.js",
"methods": ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]
}
]
}
-
Generate Prisma and copy the generated folder to
dist
. Checkpackage.json
->vercel build
, the last commandcp -r src/prisma/generated/ dist/prisma/
. -
Add environment variables. Open Vercel Console ->
https://vercel.com/[projects]/[project]/settings/environment-variables
, and add your own environment variables. -
deploy
npm i -g vercel
vercel login
pnpm run vercel-build
vercel --prod
curl --location 'https://auth-crud-app.vercel.app/auth/login' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "[email protected]",
"password": "12345678"
}'