Skip to content
µweb is a micro web framework for go.
Go
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
examples Add FastCGI support.
.gitignore
.travis.yml Try an alternative way to fix the build
LICENSE
README.md Update README.md
autoreload.go Add autoreload support :)
doc.go
example_test.go
uweb.go Improve the logging support. Use go's built in log library.
uweb_test.go Disable logging in tests.

README.md

µweb

A micro web framework for Go.

Build Status

Overview

µweb is a small library designed to simplify the creation of web apps in Go.

It is heavily inspired by the Python library BottlePy.

Note: µweb is currently pre-alpha. The existing API is fairly stable but may change.

Example: Hello World

package main

import (
    "github.com/calebbrown/uweb"
    "fmt"
)

func main() {
    uweb.Route("^hello/(.*)$", func(name string) string {
        return fmt.Sprintf("<b>Hello, %s!</b>!", name)
    })
    uweb.Run("localhost:8080")
}

Copy and paste this code into an editor, save the file as hello.go, in a shell run go run hello.go, then point your browser to localhost:8080/hello/world.

Installation

Make sure you have Go 1.1 installed and $GOPATH is set.

go get github.com/calebbrown/uweb

Documentation

Visit http://godoc.org/github.com/calebbrown/uweb or simply run godoc -http=":6060" after installation and visit localhost:6060/pkg/github.com/calebbrown/uweb.

Something went wrong with that request. Please try again.