Skip to content

MrWater233/gen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

使用教程

  1. 安装Go并通过以下命令安装Gen

    go get -u github.com/MrWater233/gen
  2. 在代码中导入

    import "github.com/MrWater233/gen"
  3. 简单的使用

    package main
    
    import "github.com/MrWater233/gen"
    
    func main() {
    	r := gen.New()
    	// 加载日志中间件
    	r.Use(gen.Logger())
    	r.GET("/", func(c *gen.Context) {
    		c.HTML(200, "<h1>Hello Gen!</h1>")
    	})
    	// 开启服务,监听8000端口
    	r.Run(":8000")
    }

About

Lightweight web framework based on golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages