github.com/go-kivik/kivik/v4@v4.3.2/pouchdb/README.md (about) 1 [](https://pkg.go.dev/github.com/go-kivik/kivik/v4/pouchdb) 2 3 # Kivik PouchDB 4 5 PouchDB driver for [Kivik](https://github.com/go-kivik/pouchdb). 6 7 ## Installation 8 9 Kivik 3.x and newer requires Go 1.11+, with Go modules enabled. At the time of 10 this writing, GopherJS still does not support Go modules (this is tracked at 11 [GopherJS Issue #855](https://github.com/gopherjs/gopherjs/issues/855)). Despite 12 this shortcoming of GopherJS, it is relatively straight forward to use the 13 standard Go toolchain as a dependency manager for GopherJS. I have written a 14 brief tutorial on this [here](https://jhall.io/posts/gopherjs-with-modules/), 15 with Kivik as an example. 16 17 ## Usage 18 19 This package provides an implementation of the 20 [`github.com/go-kivik/kivik/v4/driver`](http://pkg.go.dev/github.com/go-kivik/kivik/v4/driver) 21 interface. You must import the driver and can then use the full 22 [`Kivik`](http://pkg.go.dev/github.com/go-kivik/kivik/v4) API. 23 24 ```go 25 //go:build js 26 27 package main 28 29 import ( 30 "context" 31 32 kivik "github.com/go-kivik/kivik/v4" 33 _ "github.com/go-kivik/kivik/v4/pouchdb" // The PouchDB driver 34 ) 35 36 func main() { 37 client, err := kivik.New(context.TODO(), "pouch", "") 38 // ... 39 } 40 ``` 41 42 This package is intended to run in a JavaScript runtime, such as a browser or 43 Node.js, and must be compiled with 44 [GopherJS](https://github.com/gopherjs/gopherjs). At runtime, the 45 [PouchDB](https://pouchdb.com/download.html) JavaScript library must also be 46 loaded and available. 47 48 ## What license is Kivik released under? 49 50 This software is released under the terms of the Apache 2.0 license. See 51 LICENCE.md, or read the [full license](http://www.apache.org/licenses/LICENSE-2.0).