tsp-web

1.6.0 • Public • Published

tsp-web

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

TSP Web Preview

Installation

Production

  1. Install NodeJS
  2. Run sudo npm install -g tsp-web
  3. 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
  2. Run npm install && npm start
  3. 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
  2. In the root directory of this project call debuild -uc -us
  3. Install your Debian package sudo dpkg -i ../tsp-web*.deb
  4. add your user to the tsp group sudo usermod -aG tsp $USER
  5. 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/
  2. Build your docker image: docker build -t $USER/tsp-web .
  3. Create a container from this image: docker run --name my-tsp-web -p "3000:3000" -d $USER/tsp-web:latest
  4. 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"
  5. 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)
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

Package Sidebar

Install

npm i tsp-web

Weekly Downloads

3

Version

1.6.0

License

ISC

Unpacked Size

74 kB

Total Files

30

Last publish

Collaborators

  • brunnerlivio