https://github.com/go-kivik/proxy
A simple Go http.Handler proxy for CouchDB
https://github.com/go-kivik/proxy
couchdb database go http-server proxy
Last synced: 6 months ago
JSON representation
A simple Go http.Handler proxy for CouchDB
- Host: GitHub
- URL: https://github.com/go-kivik/proxy
- Owner: go-kivik
- License: other
- Created: 2017-12-09T18:40:27.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-04-10T10:32:07.000Z (about 6 years ago)
- Last Synced: 2024-06-20T03:31:55.543Z (about 2 years ago)
- Topics: couchdb, database, go, http-server, proxy
- Language: Go
- Size: 10.7 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://travis-ci.org/go-kivik/proxy) [](https://codecov.io/gh/go-kivik/proxy) [](http://godoc.org/github.com/go-kivik/proxy)
# Kivik Proxy
This package provides a CouchDB proxy accessible as a Go
[`http.Handler`](https://golang.org/pkg/net/http/#Handler).
## Example
```go
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
}
```
## What license is Kivik released under?
This software is released under the terms of the Apache 2.0 license. See
LICENCE.md, or read the [full license](http://www.apache.org/licenses/LICENSE-2.0).