Chat System — make it production-ready
Given a basic chat API, evolve the implementation into something production-ready.
Current API
GET /messages — client polls every 10 seconds.
Response:
[
{
"text": "",
"userId": "",
"timestamp": ""
}
]
POST /messages
Request:
{
"text": "",
"username": ""
}
Response: