Coder Social home page Coder Social logo

yurenyong123 / gem Goto Github PK

View Code? Open in Web Editor NEW

This project forked from clevergo/clevergo

0.0 2.0 0.0 367 KB

a simple and fast web framework written in Go(golang), for building restful or web application, it built on top of fasthttp.

License: Other

Go 100.00%

gem's Introduction

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.

Semantic Versioning

Gem follows semantic versioning 2.0.0 managed through GitHub releases.

Support Us

  • ⭐ the project.
  • Spread the word.
  • Contribute to the project.

Contribute

We’re always looking for help, so if you would like to contribute, we’d love to have you!

Motivation

Just for figuring out the web framework's workflow, and try to design a simple and strong web framework.

Related Packages

  • tests - a tests package for fasthttp and Gem.
  • sessions - a sessions manager package for fasthttp.
  • log - a simple, leveled logging package.

FAQ

  1. What should I pay attention to?

    At present, Gem is incompatible with some APIs of fasthttp, the incompatible APIs following:

    • fasthttp.TimeoutHandler
  2. What is the difference between of fasthttp and gem?

    Gem built on top of fasthttp, and use Server.ServeConn to serve connections, it can not works without fasthttp.

    Advantages:

    Gem provides some useful built-in features, such as:

    • High-performance router
    • Leveled logger
    • Various middlewares
    • Sessions support
    • Graceful shutdown and restart

    Disadvantages:

    At present, Gem dose not provide APIs to Serve the custom Listener like fasthttp.Serve.

LICENSE

MIT licensed. See LICENSE file for more information.

Inspiration & Credits

I have read the code of the following open source projects, and integrate their designs into this project.

I respect these projects and it's authors, and follow their LICENSE.

If your LICENSE is missing, please contact me, I will add it ASAP.

gem's People

Contributors

gitter-badger avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.