Skip to content

eatmoreapple/regia

Repository files navigation

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

Like Flask, but for golang

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages