반응형

Martini: Web development with Go

 

Martini makes web development with Go much easier. It has a flexible routing layer, comes with a set of stock middleware, and can leverage open source web packages built in Go.

martini

 

Martini is a powerful package for quickly writing modular web applications/services in Golang.

package main

import "github.com/codegangsta/martini"

func main() {
  m := martini.Classic()
  m.Get("/", func() string {
    return "Hello world!"
  })
  m.Run()
}

Install the package (go 1.1 and greater is required):

go get github.com/codegangsta/martini

Join the Mailing list

Watch the Demo Video

Features

  • Extremely simple to use.
  • Non-intrusive design.
  • Play nice with other Golang packages.
  • Awesome path matching and routing.
  • Modular design - Easy to add functionality, easy to rip stuff out.
  • Lots of good handlers/middlewares to use.
  • Great 'out of the box' feature set.
  • Fully compatible with the http.HandlerFunc interface.

More Middleware

For more middleware and functionality, check out the martini-contrib repository.

Table of Contents

반응형

+ Recent posts