initial commit

This commit is contained in:
2025-11-25 21:03:20 +01:00
parent 73ba7c29c6
commit 1c0e22aac1
4246 changed files with 1170297 additions and 0 deletions

14
backend/Dockerfile Normal file
View File

@ -0,0 +1,14 @@
# Build stage
FROM golang:1.22 AS builder
WORKDIR /app
COPY go.mod ./
COPY main.go ./
RUN go mod tidy
RUN go build -o backend main.go
# Run stage
FROM debian:bookworm-slim
WORKDIR /app
COPY --from=builder /app/backend .
EXPOSE 8080
CMD ["./backend"]

3
backend/go.mod Normal file
View File

@ -0,0 +1,3 @@
module backend
go 1.22

16
backend/main.go Normal file
View File

@ -0,0 +1,16 @@
package main
import (
"fmt"
"log"
"net/http"
)
func main() {
http.HandleFunc("/api/hello", func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, `{"message": "Hello World from Go!"}`)
})
log.Println("Backend running on :8080")
log.Fatal(http.ListenAndServe(":8080", nil))
}