initial commit

This commit is contained in:
2026-01-23 17:54:11 +01:00
commit 273266abb7
8 changed files with 129 additions and 0 deletions

21
lib/server.go Normal file
View File

@@ -0,0 +1,21 @@
package lib
import (
"log"
"net/http"
)
type StatusBotServer struct {
}
func (server *StatusBotServer) createThreadHandler(w http.ResponseWriter, r *http.Request) {
bot := &StatusBotSender{}
bot.SendCreateThreadRequest()
w.WriteHeader(http.StatusOK)
}
func (server *StatusBotServer) Start() {
http.HandleFunc("/create-thread", server.createThreadHandler)
log.Println("Starting server on :8080")
http.ListenAndServe(":8080", nil)
}