Skip to content

ricallinson/forgery2

 
 

Repository files navigation

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.

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%