chore: initial project structure

This commit is contained in:
2026-05-23 17:57:37 +03:00
commit 551c75a232
13 changed files with 94 additions and 0 deletions

26
cmd/server/main.go Normal file
View File

@@ -0,0 +1,26 @@
package main
import (
"fmt"
"log"
"net/http"
"os"
)
func main() {
port := os.Getenv("SERVER_PORT")
if port == "" {
port = "8080"
}
mux := http.NewServeMux()
mux.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
fmt.Fprintln(w, "ok")
})
log.Printf("MrixsCraft Server starting on :%s", port)
if err := http.ListenAndServe(":"+port, mux); err != nil {
log.Fatal(err)
}
}