API for handling users CRUD operations and authentication, developed with the following technologies:
- Typescript
- Express
- Postgres
- Prisma ORM
- Jest
- Docker
- Github Actions
- Swagger
- NodeJS
- NPM
- Eslint
- NodeJS => 18.16.0
- PostgreSQL or Docker
You can create a database using PostgreSQL or Docker (you can run "npm run compose:db" to setup the database), after database creation you must configure ".env" file with the database credentials
-
Clone the repository
-
Configure env file: You should rename "example.env" file to ".env" and configure enviroment variables that are going to be used
-
Install dependencies
npm install
-
Generate prisma schema
npx prisma generate
-
Apply database migrations
npx prisma migrate dev
-
Run express app as development using nodemon
npm run start:dev
- Build application
npm run build
- Run e2e tests
npm run test
- Run e2e tests in watch mode
npm run test:watch
- Run production docker container
npm run compose:prod
- Run development docker container
npm run compose:dev
- Run only database
npm run compose:db
- Run linter (eslint)
npm run lint