gui prints output from an http get to a configured URL

This commit is contained in:
bel
2023-03-25 09:59:39 -06:00
parent 8182f90783
commit b1cb419f3d
5 changed files with 516 additions and 5 deletions

15
src/testdata/http.go vendored Normal file
View File

@@ -0,0 +1,15 @@
package main
import (
"net/http"
"os"
)
func main() {
p := os.Getenv("PORT")
if err := http.ListenAndServe(":"+p, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte(os.Getenv("BODY")))
})); err != nil {
panic(err)
}
}