Skip to content
Forgery2 is a minimal and flexible Go web application framework, providing a robust set of features for building APIs and single or multi-page web applications.
Branch: master
Clone or download
ricallinson Merge pull request #8 from ricallinson/master
Updated readme and created example.
Latest commit f9f24ae Nov 28, 2015
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
fixtures/views Basic test for view engines Oct 5, 2015
.gitignore Clean up of Param function Oct 6, 2015
.travis.yml Basic test for view engines Oct 5, 2015
README.md Updated readme Nov 28, 2015
application.go Improved view engine error message. Oct 5, 2015
application_test.go Moved mocks into own file Aug 26, 2015
bench_test.go Added test Aug 27, 2015
methods.go fmt Aug 26, 2015
mocks.go Moved mocks into own file Aug 26, 2015
renderer.go Added main code from forgery Aug 25, 2015
request.go Clean up of Param function Oct 6, 2015
request_test.go
response.go Changed Ip, Ips, Body, Query and Files to functions Oct 5, 2015
response_render_test.go Improved view engine error message. Oct 5, 2015
response_test.go
route.go
route_test.go Added router tests Aug 25, 2015
router.go Changed Params attr to a function call Oct 6, 2015
router_test.go
utils.go

README.md

forgery2

Build Status

UNSTABLE VERSION 2.0: The current stable version is here forgery

Forgery is a minimal and flexible golang web application framework, providing a robust set of features for building single and multi-page, web applications.

  • Robust routing
  • HTTP helpers (redirection, caching, etc)
  • View system supporting 1 template engine (hopefully more will come)
  • Content negotiation
  • Focus on high performance
  • Environment based configuration
  • High test coverage

Install

go get github.com/goforgery/forgery2

Use

Starts a web server.

package main

import(
    "github.com/goforgery/forgery2"
)

func main() {
    app := f.CreateApp()
    app.Get("/", func(req *f.Request, res *f.Response, next func()) {
        res.Send("Hello world.")
    })
    app.Listen(3000)
}

Testing

go test ./...

Code Coverage

go test -coverprofile=coverage.out; go tool cover -html=coverage.out -o=coverage.html
open coverage.html

Benchmark

go test -bench=. -run=BENCH_ONLY

Notes

This project started out as a clone of the superb Node.js library Express.

You can’t perform that action at this time.