EvanDbg / regia

go web framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

regia

Regia is a web framework written with golang !

It is simple, helpful and with high performance. Build your own idea with it !

Installation

Golang version 1.11 + required

go get github.com/eatmoreapple/regia

Quick Start

$ touch main.go
# add all following codes into main.go
package main

import "github.com/eatmoreapple/regia"

func main() {
	engine := regia.New()
	engine.GET("/string", func(context *regia.Context) {
		context.String("string")
	})
	engine.POST("/json", func(context *regia.Context) {
		var body struct {
			Name string `json:"name"`
			Age  uint8  `json:"age"`
		}
		context.BindJSON(&body)
		context.JSON(body)
	})
	engine.Run(":8000")
}
$ go run main.go
# open your brower and visit `localhost:8000/`

About

go web framework

License:GNU General Public License v3.0


Languages

Language:Go 100.0%