Run the PostgreSQL & Redis using docker-compose up
Run the migrations npx prisma migrate dev
Generate new Prisma client npx prisma generate
Run the service npm run start
Usage:
Create a user by POST to localhost:5000/api/v1/users {"name": YOUR_NAME, "email": VALID_EMAIL}
Take the ID of the user.
Now you can create a task with a user attached to it by POST to localhost:5000/api/v1/tasks for non-recurring task the payload should be at least { "name": YOUR_TASK_NAME }. For the recurring one - { "name": YOUR_TASK_NAME, "recurringInterval": "every_minute" | "every_day" | "every_week" | "every_two_weeks", userId: UUID4_OF_THE_USER_TO_ASSIGN_THE_TASK }
Once you created a recurring task, you have to see in the console after every your recurring interval a log of "Notify user ${id}"