16 lines
220 B
Go
16 lines
220 B
Go
package main
|
|
|
|
import "github.com/gin-gonic/gin"
|
|
|
|
import "log"
|
|
|
|
func login(ctx *gin.Context) {
|
|
ctx.Writer.WriteString("hello")
|
|
}
|
|
|
|
func main() {
|
|
eg := gin.New()
|
|
eg.GET("/api/login", login)
|
|
log.Fatal(eg.Run(":3001"))
|
|
}
|