go get github.com/Boofny/goLive@latestpackage main
import (
"net/http"
"github.com/Boofny/goLive"
"github.com/Boofny/goLive/middleware"
)
func main() {
e := goLive.Launch()
e.Chain(middleware.CORS())
e.GET("/ping", func(c *goLive.Context)error{
return c.SendSTRING(http.StatusOK, "pong") //send out your data
})
e.StartServer(":8080")
}curl -X GET localhost:8080/hellohttp://localhost:8080/hello