httpsrv is a Lightweight, Modular, High Performance MVC web framework for the Go language.
Documents:
first hello world demo
package main
import (
"github.com/hooto/httpsrv"
)
type Hello struct {
*httpsrv.Controller
}
func (c Hello) WorldAction() {
c.RenderString("hello world")
}
func main() {
mod := httpsrv.NewModule()
mod.RegisterController(new(Hello))
srv := httpsrv.NewService()
srv.SetLogger(httpsrv.NewRawLogger())
srv.HandleModule("/demo", mod)
srv.Start(":3000")
}
go run hello.go
curl http://localhost:3000/demo/hello/world
hello world
Licensed under the Apache License, Version 2.0