A web UI to run on balenaDash. Make
post requests with a URL parameter to have the server launch a subprocess and show the submitted URL on screen.
I wrote a blog post about the project.
Quick video demo below (click to play on YouTube). The "Hello World" page is our base
How to compile
To compile for raspi:
env GOOS=linux GOARCH=arm GOARM=5 go build
How to use on a balenaDash device
Copy the binary and
templates directory onto the raspi and run it:
chmod +x tohora ./tohora PORT COMMAND
PORTis the port number. Use 80 for vanilla http
COMMANDis the command that the URL is passed to. On balenaDash, use
./tohora 80 WPELauncher. For manual testing/development try-outs use
sleepor something equally harmless, e.g.
go run tohora.go 8000 sleep.
Access over the internet
In balena, open port 80 on your docker container and turn on the public URL feature. Then the web UI will be served at the public URL.
After opening the public URL (see above), add a slack app to allow you to throw URLs onto your screen. Start at https://api.slack.com/apps?new_app=1 and set up a new "Slash command" like this:
Post or Slack an empty URL or click the 'Clear' button to clear the screen.
tohora Copyright (C) 2019 Richard Morrison www.rmorrison.net
This program comes with ABSOLUTELY NO WARRANTY; for details see `LICENSE`. This is free software, and you are welcome to redistribute it under certain conditions; see `LICENSE` for details.