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 386323a6ed HTTP method names are case sensitive 12 years ago
bind Socket bind helper package 12 years ago
graceful fancyWriters should also implement io.ReaderFrom 12 years ago
param Parameter parsing 12 years ago
web HTTP method names are case sensitive 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