This package provides a CouchDB proxy accessible as a Go
http.Handler
.
package main
import (
"log"
"net/http"
"github.com/go-kivik/proxy"
)
func main() {
p, err := proxy.New("http://localhost:5984")
if err != nil {
log.Fatal(err)
}
s := &http.Server{
Handler: p,
}
log.Fatal(s.ListenAndServe(":8080")) // localhost:5984 now proxied to localhost:8080
}
This software is released under the terms of the Apache 2.0 license. See LICENCE.md, or read the full license.