Ferramenta / Pacote | Versão | Opcional |
---|---|---|
Docker Desktop | ^4 | |
Docker Compose | ^2 | x |
VsCode | ^1.8 | x |
Node | ^18 | |
Yarn ou Npm | ^1.22 ou ^9.8 |
route | get | post | patch | delete |
---|---|---|---|---|
auth | [ token, refresh ] | |||
customers | [ findOne ] | [ register ] | [ update ] | [ remove ] |
passwords | [ recover ] | [ update, reset ] |
Copie o template do env para .env
cp env-example .env
Instale as dependências do package.json
yarn install && yarn build
PORT=3000
NODE_ENV=dev
DATABASE_URL="postgresql://postgres:docker@localhost:5432/DEVELOPMENT?schema=public"
CORS_ORIGIN=http://localhost:5173
URL_RESET_PASSWORD=http://localhost:5173/password/reset
RATE_LIMITER_MAX_REQUEST=100
RATE_LIMITER_DURATION=10 # Set Minutes
JWT_SECRET=001001001001
JWT_EXPIRATION=3h
JWT_EXPIRATION_RECOVER=5m
ENCRYPT_JWT_SECRET=1001001001001
NODEMAILER_USER=example@email.com
NODEMAILER_PASS=password
NODEMAILER_HOST=smtp.gmail.com
NODEMAILER_PORT=465
# Para subir o container
docker compose up -d
yarn prisma generate # atualizar o prisma.schema
yarn prisma db push # subir o schema para o banco de dados
yarn prisma studio # visualizar os dados
yarn start # production - [node dist/src/main]
yarn start:dev # watch - [nest start --watch]
yarn test # unit tests
yarn test:e2e # e2e tests
Nest is MIT licensed.