Skip to content
/ httpsrv Public

Lightweight, Modular, High Performance MVC web framework for Golang

License

Notifications You must be signed in to change notification settings

hooto/httpsrv

Repository files navigation

httpsrv

httpsrv is a Lightweight, Modular, High Performance MVC web framework for the Go language.

Documents:

Quick Start

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

Licensing

Licensed under the Apache License, Version 2.0

About

Lightweight, Modular, High Performance MVC web framework for Golang

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages