This is a generic Nest template intended to be used as a starting point for new projects where you need to have a REST API and with authentication and authorization. It uses Prisma ORM.
$ 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
- POST /auth/register
- POST /auth/login
- POST /profile
- POST /firebase/email
- POST /firebase/anonymous
- POST /firebase/phone
- POST /webauth/connect
- POST /webauth/approve
Creating migration
prisma migrate dev --name init
When you make changs=es ti schema.prisma, run this again to creating a second migration
prisma migrate dev --name second_migration
Deploy the migrations
prisma migrate deploy
Migration status
prisma migrate deploy
login into herioku
heroku login
create an application
heroku create
For local development db you can either use these following options:
pnpm dotenv -e .env.dev -- pnpm prisma migrate dev --name <dev_name>
or
pnpm prisma db push
pnpm prisma migrate deploy