From 8d1c6219f7d5f4328047bce57cd7f5129be95fec Mon Sep 17 00:00:00 2001 From: altaf-creator Date: Mon, 21 Oct 2024 07:57:29 +0700 Subject: init --- main.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 main.go (limited to 'main.go') diff --git a/main.go b/main.go new file mode 100644 index 0000000..3f8a165 --- /dev/null +++ b/main.go @@ -0,0 +1,21 @@ +package main + +import "fmt" +import "net/http" +import "github.com/gin-gonic/gin" +import lesson "git.altafcreator.com/learnsmp.id-backend/modules/subject/lesson" + +var albums = []int{} + +func main() { + fmt.Println("Hello, world!") + router := gin.Default() + router.GET("/lessons", getAlbums) + + router.Run("localhost:9090") +} + +func getAlbums(c *gin.Context) { + c.IndentedJSON(http.StatusOK, albums) + lesson.Test() +} -- cgit v1.2.3