/indigo

Indigo is a blazingly fast web-framework

Primary LanguageGoMIT LicenseMIT

This is just a logo

Indigo is non-idiomatic, but focusing on simplicity and performance web-server

Documentation

Documentation is available here. However, it isn't complete yet.

Hello, world!

package main

import (
  "log"
  
  "github.com/indigo-web/indigo"
  "github.com/indigo-web/indigo/http"
  "github.com/indigo-web/indigo/router/inbuilt"
)

const addr = ":8080"

func MyHandler(request *http.Request) *http.Response {
  return request.Respond().String("Hello, world!")
}

func main() {
  r := inbuilt.New()
  r.Resource("/").
    Get(MyHandler).
    Post(MyHandler)

  app := indigo.NewApp(addr)
  if err := app.Serve(r); err != nil {
    log.Fatal(err)
  }
}

More examples in examples/ folder.