Proyectos
Ver en GitHub 
indigo-web/indigo
Acerca de
Indigo is a blazingly fast web-framework
Desarrollo web y de aplicacionesCrecimiento de estrellas medido
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Recopilando historial
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
Originalindigo
Elegance, conciseness, flexibility and extensibility — that’s what Indigo is about. The goal is to create a mini ecosystem in which you can focus on actual tasks rather than reimplementing the same things over and over again. Everything you need to get started is already included, and whatever isn’t is trivially pluggable.
- FastHTTP-grade performance
- Stream-based body processing
- Fine-tuning of parameters like memory consumption and timeouts
- A full-fledged built-in router
- Method chaining at its finest
Documentation
Documentation is available here. It might be incomplete however, feel free to open issues.
Hello, world!
package main
import (
"log"
"github.com/indigo-web/indigo"
"github.com/indigo-web/indigo/http"
"github.com/indigo-web/indigo/router/inbuilt"
)
func HelloWorld(request *http.Request) *http.Response {
return http.String(request, "Hello, world!")
}
func Log(request *http.Request) *http.Response {
text, err := request.Body.String()
if err != nil {
return http.Error(request, err)
}
log.Printf("%s says: %s", request.Remote, text)
return http.String(request, text)
}
func main() {
r := inbuilt.New()
r.Resource("/").
Get(HelloWorld).
Post(Log)
err := indigo.New(":8080").Serve(r)
if err != nil {
log.Fatal(err)
}
}
You can find more examples in examples/.
Explorar proyectos relacionados
Cargando…