Skip to content
/ goji Public
forked from zenazn/goji

Goji is a minimalistic web framework for Golang that's high in antioxidants

License

Notifications You must be signed in to change notification settings

no2key/goji

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Goji

Goji is a minimalistic web framework inspired by Sinatra. Godoc.

Example

package main

import (
        "fmt"
        "net/http"

        "github.com/zenazn/goji"
        "github.com/zenazn/goji/web"
)

func hello(c web.C, w http.ResponseWriter, r *http.Request) {
        fmt.Fprintf(w, "Hello, %s!", c.UrlParams["name"])
}

func main() {
        goji.Get("/hello/:name", hello)
        goji.Serve()
}

Goji also includes a sample application in the example folder which was artificially constructed to show off all of Goji's features. Check it out!

Features

  • Compatible with net/http
  • URL patterns (both Sinatra style /foo/:bar patterns and regular expressions)
  • Reconfigurable middleware stack
  • Context/environment objects threaded through middleware and handlers
  • Automatic support for Einhorn, systemd, and more
  • Graceful shutdown, and zero-downtime graceful reload when combined with Einhorn.
  • Ruby on Rails / jQuery style parameter parsing

About

Goji is a minimalistic web framework for Golang that's high in antioxidants

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published