Create backend that will read queue from rabbitmq on channel req.create.todo
with body json that have only 1 field its {name: string}
. Your backend will save the data and publish todo object as JSON string
with field. {id: string, name: string, created: long}
on channel todo.created
.
details response for id
you can put random string like uuid
, and the name
should be same from req.create.todo
, last for the created
should be UTC time from current time
and convert to millis
and publish that message to queue on channel todo.created
.
and do that for the delete with channel req.delete.todo
with body json {id: string}
the id that you give on the add task and backend publish on channel todo.deleted
with data same type with todo.created
.
the last its create the http GET
for read all todo datas.
We will send message on queue
with on channel req.create.todo
5 times, and send message on req.delete.todo
2 times. and than our server will read todo.created
for create data in our server and todo.deleted
for delete data in our server.
last thing we request http directly on your backend to get all todo data. if the data its same size compare our server task will be correct.
Don't forget to create .env for rabbitmq client host,port,user,password. So we can easy change it later.
- Unit test it's plus
- Make code clean with pattern. use the pattern that you love it.
- Code should be easy to read and understand (put the comment if you worried)
- You can create that with Go/Node.js (Go is plus)
- Don't forget put ReadMe.md and explain how to run the program you make it. Use docker compose it's plus
- Send the task with subject Backend developer to [email protected] cc [email protected]