Ecommerce Authentication Microservice
Simple microservice that handle authentication related endpoints in an e-commerce app
🧰 Stack
- TypeScript
- Nest JS
- R2DBC
- Postgres
✨ Features
- REST API using NestJS
- JWT authentication
- TODO:
- CI/CD
- Test Coverage
🚀 Running the app
- Requirements:
- Node (v14+)
- Postgres
- pgAdmin4 (optional)
Develop
-
First, copy the
.env.example
in the root dir of the project and rename it to.env
. Inside it you will find the environment variables necessary to the project run, so you will need to change the values accordingly. -
Now, with pgAdmin or using the command line, create a Database (the name is up to you) and update the
DB_NAME
value with the name you have chose. Update the rest of the variables according to your database configuration and credentials. -
Install the dependencies with:
yarn install
ornpm install
; -
Generate prisma client:
$ npx prisma generate
-
Apply prisma migrations to your database:
$ npx prisma migrate deploy
-
Start the server:
$ yarn start:dev
Production
Run via Docker 🐳:
docker-compose up server