From 804d6f1d21e73a45276de1443c8f65baeb9ef5c0 Mon Sep 17 00:00:00 2001 From: haraldnilsen Date: Thu, 21 Dec 2023 20:58:57 +0100 Subject: [PATCH] :fire: removed api folder Co-authored-by: Sindre Kjelsrud --- backend/cmd/api/main.go | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 backend/cmd/api/main.go diff --git a/backend/cmd/api/main.go b/backend/cmd/api/main.go deleted file mode 100644 index 052d4ca..0000000 --- a/backend/cmd/api/main.go +++ /dev/null @@ -1,32 +0,0 @@ -package main - -import ( - "fmt" - "io" - "net/http" - - "github.com/gin-gonic/gin" -) - -func main() { - router := gin.Default() - - // Define a basic GET request handler - router.GET("/ping", func(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{ - "message": "pong", - }) - }) - - // Info about user - router.POST("/submitform", func(c *gin.Context) { - jsonData, err := io.ReadAll(c.Request.Body) - if err != nil { - // Handle error - } - fmt.Print(string(jsonData)) - }) - - // Run the server on port 8080 - router.Run(":8080") -}