https://github.com/ynathan/queue-handler
Queue handler
https://github.com/ynathan/queue-handler
Last synced: over 1 year ago
JSON representation
Queue handler
- Host: GitHub
- URL: https://github.com/ynathan/queue-handler
- Owner: YNathan
- Created: 2024-05-28T12:53:52.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-28T13:29:35.000Z (about 2 years ago)
- Last Synced: 2025-01-23T10:33:50.401Z (over 1 year ago)
- Language: TypeScript
- Size: 67.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Queue Management API
This project implements a REST API for managing queues of messages using Node.js and Express. The API supports adding messages to queues and retrieving the next message from a queue with an optional timeout.
## Features
- **Add Message to Queue**: POST a message to a specified queue.
- **Get Next Message from Queue**: GET the next message from a specified queue, with support for a timeout if the queue is empty.
## Testing Approach
The tests are written in a way that ensures the server is running concurrently with the test script. We use the concurrently package to handle this.
## Example Test Workflow
Start the Server: The server is started using npm run start.
Run the Test Script: The test script waits for the server to be up and running, then performs the tests by sending requests to the server.
## Test Scenarios:
Adding a message to the queue.
Fetching the next message from the queue with a timeout.
Checking that each customer will got his relevent message