Re-implemented demo button

This commit is contained in:
Imbus 2024-03-06 09:41:36 +01:00
parent 9e790696a5
commit 9d39ff5bc2
2 changed files with 18 additions and 2 deletions

View file

@ -36,6 +36,10 @@ func main() {
// Register our handlers
server.Post("/api/register", gs.Register)
// Register handlers for example button count
server.Get("/api/button", gs.GetButtonCount)
server.Post("/api/button", gs.IncrementButtonCount)
// Announce the port we are listening on and start the server
err = server.Listen(fmt.Sprintf(":%d", conf.Port))
if err != nil {