-
Notifications
You must be signed in to change notification settings - Fork 42
Simple begining
YoyoFx edited this page Dec 9, 2020
·
3 revisions
go get github.com/yoyofx/yoyogo
package main
import (
WebApplication "github.com/yoyofx/yoyogo/web"
......
)
func main() {
webHost := WebApplication.CreateDefaultBuilder(func(rb router.IRouterBuilder) {
rb.GET("/info",func (ctx *context.HttpContext) {
ctx.JSON(200, context.M{"info": "ok"})
})
}).Build().Run() //default port :8080
}