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 9641eb21e3 Overwrite Connection: close header, don't append 12 years ago
bind Socket bind helper package 12 years ago
graceful Overwrite Connection: close header, don't append 12 years ago
param Parameter parsing 12 years ago
web Automatic HEAD support for GET handlers 12 years ago
README.md Standard middlewares 12 years ago
default.go Automatic OPTIONS middleware 12 years ago
goji.go Standard middlewares 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