The project has currently two modules with separate package.json files in each of them. And husky
is configured in both of them.
- Make sure you've installed node_modules
- When committing new files,
prettier --write
will be executed in both modules
In order to start consuming messages as more than one worker queue, one should run
node consumer/consumer.js
If not provided, the port used is 8080
. Thus, in case more than 1 worker queue is about to set up, the command should look like
PORT=X node consumer/consumer.js
Where X
is a port number the user wants to use.
Sample request: curl --location --request POST 'http://localhost:8080/message?name=dev&desc=testing
The assumption is, that the processing of the consumed message by the worker takes 2 seconds. This way, one can easily see the advantages by running more than 1 worker queue in parallel.