flutter frontend initial commit

This commit is contained in:
Odweta
2026-03-22 14:55:07 +01:00
parent 8d192f8be3
commit ea85589767
132 changed files with 4983 additions and 47 deletions
+1 -47
View File
@@ -26,50 +26,4 @@ func main() {
}
http.ListenAndServe(":"+port, r)
}
/*package main
import (
"fmt"
"encoding/json"
"net/http"
)
type Message struct {
Text string `json:"text"`
}
type User struct {
Name string `json:"name"`
}
// POST method handler
func createUserHandler(w http.ResponseWriter, r *http.Request) {
var user User
// decode json from request body
err := json.NewDecoder(r.Body).Decode(&user)
if err != nil {
http.Error(w, "invalid JSON", http.StatusBadRequest)
return
}
response := Message{Text: "User created: " + user.Name}
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(response)
}
// handler function
func helloHandler(w http.ResponseWriter, r *http.Request) {
response := Message{Text: "Hellow from Go API!"}
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(response)
}
func main() {
http.HandleFunc("/hello", helloHandler)
http.HandleFunc("/createUser", createUserHandler)
fmt.Println("server running on http://localhost:8080")
http.ListenAndServe(":8080", nil)
}*/
}