basic setup

This commit is contained in:
Valentijn van der Jagt
2026-03-08 20:32:37 +01:00
commit b938be9745
4 changed files with 36 additions and 0 deletions

24
main.go Normal file
View File

@@ -0,0 +1,24 @@
package main
// https://stackoverflow.com/questions/61080317/go-lang-very-simple-http-post-requests-and-response-endpoint (simple post endpoint)
// https://stackoverflow.com/questions/16466320/is-there-a-way-to-do-repetitive-tasks-at-intervals
import (
"log"
"net/http"
_ "github.com/mattn/go-sqlite3"
)
func checkRequestHeader(req *http.Request, res http.ResponseWriter, method string) bool {
if req.Method == method {
return true
}
res.WriteHeader(http.StatusMethodNotAllowed)
return false
}
func main() {
log.Println("[Main] now serving 0.0.0.0:8090")
http.ListenAndServe(":8090", nil)
}