- use volta for node version management and use project node version define in package.json
yarn install
yarn run prisma:generate
yarn run build
cp .env.dev .env
Changes in .env file according the project and change in prisma.schema file according to the usage
Note: One can delete the migration for the first time, if there is change in the schema of user.
yarn run prisma:migrate
yarn run prisma:seed
yarn run prisma:studio
Development - yarn run start:dev
Production - yarn run start
Staging - yarn run start or yarn start
Go to: {base-url}/api/docs Enter below credentials:
username: admin
password: Admin@123
npx prisma migrate dev --create-only
npx localtunnel --port 5003 --subdomain=nestjs-api
- add .vscode/launch.json file
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach",
"port": 9229,
"type": "node",
"request": "attach",
"skipFiles": ["<node_internals>/**"]
}
]
}
openssl ecparam -name secp521r1 -genkey -noout -out private.pem
Mailpit for testing email
docker compose -f docker-compose-mailpit.yml up -d
- set mailpit config in .env file
MAIL_HOST=localhost
MAIL_PORT=1025
Soketi for communication between server and client in real time using pusher
docker compose -f docker-compose-soketi.yml up -d
- update inbound rules in aws security group for port 6001
- if you are using cloudpanel then update inbound rules in cloudpanel for port 6001 from Admin Area Security Tab
- update inbound rules in cloudpanel for port 3306 from Admin Area Security Tab
- create one user with all privileges to access database locally
- Store email sent with subject in database with timestamp
- Store otp expiry time and maintain separate table for otp
- For reset-password use link instead of otp