後端 (BackEnd) 使用 Gin 框架實作 Micro-Service

步驟一:下載 gin 框架

go get gopkg.in/gin-gonic/gin.v1

步驟二:使用 gin 框架編程

package main

import (
    "net/http"
    "gopkg.in/gin-gonic/gin.v1"
)

func main() {
    router := gin.Default()

    router.GET("/", func(c *gin.Context) {
        c.String(http.StatusOK, "Hello World")
    })
    router.Run(":8000")
}

步驟三:呈現

results matching ""

    No results matching ""