commit 13796d8437a3cb15f3f8ed6e4c982e30d2a1e304 Author: mustafalasheen Date: Tue Apr 15 15:29:03 2025 +0200 Initial commit: Go starter template diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6727d75 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM golang:1.21-alpine + +WORKDIR /app + +COPY . . + +RUN go build -o main . + +EXPOSE 8080 + +CMD ["./main"] \ No newline at end of file diff --git a/main.go b/main.go new file mode 100644 index 0000000..4c18740 --- /dev/null +++ b/main.go @@ -0,0 +1,15 @@ +package main + +import ( + "fmt" + "net/http" +) + +func main() { + http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + fmt.Fprintf(w, "MARHABA in Ghaymah") + }) + + fmt.Println("Server starting on port 8080...") + http.ListenAndServe(":8080", nil) +} \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..c8c926e --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +# Go uses go.mod for dependencies +# This file is for reference only +go 1.21 \ No newline at end of file