Categorygithub.com/hooto/httpsrv
repositorypackage
0.12.5
Repository: https://github.com/hooto/httpsrv.git
Documentation: pkg.go.dev

# README

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