An open API service indexing awesome lists of open source software.

https://github.com/f3ath/task-dispatcher

Simple node task dispatcher
https://github.com/f3ath/task-dispatcher

Last synced: 11 months ago
JSON representation

Simple node task dispatcher

Awesome Lists containing this project

README

          

# Simple node task dispatcher
## Install
Just run `npm i` to install. I used node v9.5.0, but I hope v8 should be enough.
## The Server
Run `npm start` to start the dispatcher server on port 4200. The following requests are supported.
### Start a new test run
#### Request
`POST /start/`
#### Response
A redirect to the new test run (`/run/`)
### Show test run status
#### Request
`GET /run/`
#### Response

A successful test run
```json
{
"id": "2",
"suite": "testSuite1",
"status": "completed",
"runtime": 5079,
"results": {
"passed": 10,
"failed": 0,
"errors": ""
}
}
```
### Cancel a test run
#### Request
`DELETE /run/`
#### Response
A redirect to the test run (`/run/`)
## The Client
To start the client app run `npm run client`. The app supports 3 commands:

- `start ` starts a new test run. E.g. `npm run client start testSuite4`
- `show ` shows the status on the rest run. E.g. `npm run client show 1`
- `cancel ` cancels an active test run. E.g. `npm run client cancel 1`