Golang中国

Gem GoDoc Build Status Go Report Card Coverage Status Join the chat at https://gitter.im/go-gem/gem

Gem, a simple and fast web framework, it built top of fasthttp.

Install

go get github.com/go-gem/gem

Features

Performance

Gem benchmark

Parameter Info
Date 2016-11-01
Go Version 1.7.1
OS Ubuntu 16.04.1 LTS
CPU Intel(R) Core(TM) i7-4720HQ CPU @ 2.60GHz 8 Cores
Memory 8G

The benchmark comes from my laptop, I have send a pull request to
go-web-framework-benchmark,
waiting for merging and rerunning the benchmark.

Quick Start

package main

import (
    "log"

    "github.com/go-gem/gem"
)

func main() {
    log.Fatal(gem.ListenAndServe(":8080", func(ctx *gem.Context) {
        ctx.HTML(200, "Hello world.")
    }))
}

Run the code above, and then navigate to 127.0.0.1:8080.

Wiki

Examples


0 回复
需要 登录 后方可回复, 如果你还没有账号你可以 注册 一个帐号。