The following application is supposed to import jokes from the external resource. Besides that it provides a full joke lifecycle starting from the joke initiation, ending with update and retraction via the REST API.
Just like in real life :)
- TypeScript
- NodeJS
- NestJS
- Prisma
- Swagger
- PostgreSQL
- Docker
- The first step is to start a PostgreSQL Docker container
docker-compose up -d --build db - Apply database migrations:
npx prisma migrate dev - Start a server
npm run start
- Run the database and an application both in the Docker environment run
docker-compose up -d --build
When an application is up and running make requests via Swagger - http://localhost:3000/api or any other REST client
of your choice.
An search endpoint is responsible for finding and importing all the jokes from the external
resource into the database table.
To generate a database migration SQL upon the prisma schema adjustment run the following
command npx prisma migrate dev
Detailed information on Prisma migration can be found within the official documentation