diff options
author | altaf-creator <dev@altafcreator.com> | 2024-10-21 07:57:29 +0700 |
---|---|---|
committer | altaf-creator <dev@altafcreator.com> | 2024-10-21 07:57:29 +0700 |
commit | 8d1c6219f7d5f4328047bce57cd7f5129be95fec (patch) | |
tree | f1b2d3d8a7c439968a4b623d8527b5db8b1b576f /main.go |
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -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() +} |