Created
November 30, 2016 21:28
-
-
Save cdaringe/51b1745615231eb7d389c0bc2f31ffe7 to your computer and use it in GitHub Desktop.
pouchy-web-bunlded.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// index.js | |
const Pouchy = require('./src/index') | |
const db = new Pouchy({ name: 'kittens' }) | |
db.save({ name: 'meow' }) | |
.then(() => db.all()) | |
.then(docs => console.log(docs)) | |
// browserify index.js -o bundle.js | |
// load bundle.js into a <script src="...></script>, and you get | |
// [{ | |
// _id: "D43667BA-F237-B871-8746-3C1E012283F1", | |
// _rev: "1-aebe627bc1be60bbdedc797c8417d306", | |
// name: "meow" | |
// }] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment