- NodeJS >=8.x & NPM 5.x
- Postgres 9.x
- KOA2 middleware
- Postgres Listen/Notify
- Sockets
- Native Promise queuing
- ES2017 async/await
- .env
npm i
- install dependenciesnpm start
- start server (localhost:8081)npm run tracker waiting
- process (waiting tasks) -> completenpm run tracker pending
- process (pending tasks) -> completenpm run test
- run rest api testsnpm run dev
- run with nodemon
- Start nodejs server
npm start
. By defaults it listening on localhost:8081 - Create some jobs for further work. Use POST request for
http://localhost:8081/jobs {body}
- The next step to launch tracker by command
npm run tracker waiting
ornpm run tracker pending
depends on what status of the task you want to perform - The tracker will process the tasks while they exist, then every second it will ask the server to process for new tasks in the order of the queue FIFO one by one and in real time to notify the client of the fulfillment
- Documentation: /docs
- Client: /public/index.html
curl -XPOST "localhost:8081/jobs" -d '{"title":"Test title","description":"Test Description","type":"feature", "status" : "waiting"}' -H 'Content-Type: application/json'
curl -XGET "localhost:8081/jobs"
curl -XGET "localhost:8081/jobs/status/:waiting/limit/:1"
curl -XPUT "localhost:8081/jobs/1" -d '{"title":"Test1", "type" : "hotfix", "status" : "waiting"}' -H 'Content-Type: application/json'
curl -XGET "localhost:8081/jobs/1"
curl -XDELETE "localhost:8081/jobs/1"