pip compatible server to serve Python packages out of GitHub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Carl Jackson cbf1b4c8f9 Features! Everyone loves features! 12 years ago
bind Socket bind helper package 12 years ago
graceful Reference graceful shutdown golang issue 12 years ago
param Parameter parsing 12 years ago
web A wild web framework appears 12 years ago
README.md Features! Everyone loves features! 12 years ago
default.go New and improved toplevel package 12 years ago
goji.go New and improved toplevel package 12 years ago

README.md

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()
}

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