# tsp-web

> Displays a overview of the task spooler server of your machine in real time.

Latest version **1.6.0** (published 2023-09-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install tsp-web
pnpm add tsp-web
yarn add tsp-web
bun add tsp-web
```

Provides the command `tsp-web`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.6.0 |
| Published | 2023-09-06 |
| First published | 2023-05-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 13 |
| Unpacked size | 72.2 KB |
| Known vulnerabilities | 0 (+17 in 5 direct dependencies) |
| Install scripts | no |
| GitHub stars | 37 |
| Author | Livio Brunner |
| Maintainers | brunnerlivio |
| Keywords | tsp, task-spooler, monitor |

## Links

- npm: https://www.npmjs.com/package/tsp-web
- Repository: https://github.com/brunnerlivio/tsp-web
- Homepage: https://github.com/brunnerlivio/tsp-web#readme
- Issues: https://github.com/brunnerlivio/tsp-web/issues
- npm.io page: https://npm.io/package/tsp-web

## Dependencies (13)

- [os](https://npm.io/package/os.md) 0.1.1
- [got](https://npm.io/package/got.md) 6.5.0
- [path](https://npm.io/package/path.md) 0.12.7
- [chalk](https://npm.io/package/chalk.md) 1.1.3
- [jquery](https://npm.io/package/jquery.md) 3.1.1
- [lodash](https://npm.io/package/lodash.md) 4.16.4
- [toastr](https://npm.io/package/toastr.md) 2.1.2
- [express](https://npm.io/package/express.md) 4.14.0
- [hint.css](https://npm.io/package/hint.css.md) 2.4.0
- [commander](https://npm.io/package/commander.md) 2.9.0
- [socket.io](https://npm.io/package/socket.io.md) 1.7.4
- [user-startup](https://npm.io/package/user-startup.md) 0.2.2
- [child_process](https://npm.io/package/child_process.md) 1.0.2

## Recent versions

- 1.6.0 (latest) — 2023-09-06
- 2.0.0-beta.3 (beta) — 2023-05-19
- 1.5.1 — 2023-05-19
- 1.4.2 — 2023-05-19
- 1.4.0 — 2023-05-19
- 1.1.1 — 2023-05-15
- 1.1.0 — 2023-05-15

## README

# tsp-web

Displays a overview of the task spooler server of your machine in real time.

![TSP Web Preview](http://i.imgur.com/5TL7OeP.jpg)


## Installation

### Production

1. Install NodeJS
1. Run `sudo npm install -g tsp-web`
1. To start the server and set to startup `tsp-web start --startup`

### Development

1. Install NodeJS `sudo apt update && sudo apt install -y nodejs nodejs-legacy npm`
1. Run `npm install && npm start`
1. Open your browser on `http://localhost:3000`

### Debian package

In order to create a Debian package you have to:

1. Install package dependencies `sudo apt update && sudo apt install -y build-essential fakeroot devscripts`
1. In the root directory of this project call `debuild -uc -us`
1. Install your Debian package `sudo dpkg -i ../tsp-web*.deb`
1. add your user to the tsp group `sudo usermod -aG tsp $USER`
1. Log out and log back in. This ensures your user is running with the correct permissions.

## Try it out with docker

Run the following command:

```
docker run -d -p "3000:3000" --name "my-tsp-web" ghcr.io/brunnerlivio/tsp-web:master

# Spawn tasks
docker exec -d my-tsp-web /bin/bash -c "tsp -L OK ls && tsp -L NOK foobar && tsp -L WAIT sleep 30"

# Open up on localhost:3000
```

### From Source


Use the Docker file to create your image and play around with tsp-web

1. Install Docker, following the instructions https://docs.docker.com/engine/installation/
1. Build your docker image: `docker build -t $USER/tsp-web .`
1. Create a container from this image: `docker run --name my-tsp-web -p "3000:3000" -d $USER/tsp-web:latest`
1. Execute some tsp commands in your container: `docker exec -d my-tsp-web /bin/bash -c "tsp -L OK ls && tsp -L NOK foobar && tsp -L WAIT sleep 30"`
1. have a look at the web interface: `firefox "$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' my-tsp-web):3000"`

Oneliner: `docker rm -f my-tsp-web && docker build -t $USER/tsp-web . && docker run --name my-tsp-web -p "3000:3000" -d $USER/tsp-web:latest && docker exec -d my-tsp-web /bin/bash -c "tsp -L OK ls && tsp -L NOK foobar && tsp -L WAIT sleep 30" && firefox "localhost:3000"`

### Environment

| Environment    | Description                         | Example                                 | Default   |
|:---------------|:------------------------------------|:----------------------------------------|:----------|
| `TSP_WEB_BIN`  | The binary name of TSP              | `tsp` (for Linux) <br /> `ts` (for Mac) | `tsp`     |
| `TSP_WEB_PORT` | The port number to run TSP-Web on   | `8080`                                  | `3000`    |
| `TSP_WEB_HOSTNAME` | The hostnamre to run TSP-Web on | `192.168.0.20`                          | `0.0.0.0` |

---
_Source: https://npm.io/package/tsp-web · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
