A simple CRUD REST api used to manage tickets from travel agency built with NestJS, Prisma and PostgreSQL. The app can be tested using Postman or any rest api client of your choice.
Routes implemented :
- POST /tickets - Creates a ticket record
- POST /tickets/upload - creates a ticket record from a ticket file
- POST /tickets/upload/batch - creates the corresponding ticket record for each ticket file upload in the batch
- GET /tickets - Get all ticket records stored in the database
- GET /tickets/:id - Get a ticket record by its id
- PATCH /tickets/:id - Update information of a ticket record
- DELETE /tickets/:id - deletes a single ticket record
Note : The files aren't stored in the database. Informations related to each ticket are extracted and stored in the database. For ticket samples see folder /ticket-samples
- Docker (Needed)
- PostgresSQl will run in a docker container using docker compose, as a result docker desktop is required since it includes docker compose.
- Docker Desktop is available for Mac,Windows and Linux (Skip this step if you have docker desktop)
- Once Docker desktop installed, pull PostgreSQL image from Docker hub using docker desktop
$ npm install$ npm run db:dev:start# development mode
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod