focalboard/linux/main.go

33 lines
565 B
Go
Raw Normal View History

2020-10-29 07:50:25 +01:00
package main
import (
"log"
"os"
"os/exec"
"strconv"
"github.com/webview/webview"
)
func runOctoTasks() {
2020-10-29 10:03:48 +01:00
cmd := exec.Command("./octoserver", "--monitorpid", strconv.FormatInt(int64(os.Getpid()), 10))
2020-10-29 07:50:25 +01:00
cmd.Stdout = os.Stdout
err := cmd.Run()
if err != nil {
log.Fatal(err)
}
log.Printf("Just ran subprocess %d, exiting\n", cmd.Process.Pid)
}
func main() {
debug := true
w := webview.New(debug)
defer w.Destroy()
go runOctoTasks()
w.SetTitle("Octo Tasks")
w.SetSize(1024, 768, webview.HintNone)
w.Navigate("http://localhost:8000")
w.Run()
}