Macrame/be/main.go
2025-03-23 18:22:36 +01:00

26 lines
367 B
Go

package main
import (
"log"
"net/http"
"be/app"
)
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
app.ApiCORS(w, r)
if r.Method == "GET" {
app.ApiGet(w, r)
} else if r.Method == "POST" {
app.ApiPost(w, r)
}
})
// helper.OpenBrowser("http://localhost:6970")
log.Fatal(http.ListenAndServe(":6970", nil))
}