Small surface api to install, update and manage garden apps. Use in node, requirejs, and browser global.
npm install garden-core -g
garden-core http://garden20.com/market/details/answers http://admin:secret@localhost:5984
var garden_core = require('garden-core');
garden_core.install('http://garden20.com/market/_db', 'bookmarks', 'http://localhost:5984/', 'bookmarks', function(err) {
if (err) console.log('no bookmarks for you');
});
jam install garden-code
require(['garden-core'], function(garden_core) {
garden_core.install('http://garden20.com/market/_db', 'bookmarks', 'http://localhost:5984/', 'bookmarks', function(err) {
if (err) console.log('no bookmarks for you');
});
})
<script src="https://github.com/garden20/garden-core/raw/master/assets/async.min.js" type="text/javascript"></script>
<script src="https://github.com/garden20/garden-core/raw/master/assets/jquery-1.8.3.min.js" type="text/javascript"></script>
<script src="https://github.com/garden20/garden-core/raw/master/assets/couchr-browser.js" type="text/javascript"></script>
<script src="https://github.com/garden20/garden-core/raw/master/assets/url.js" type="text/javascript"></script>
<script src="https://github.com/garden20/garden-core/raw/master/assets/garden-core.min.js" type="text/javascript"></script>
<script>
garden_core.install('http://garden20.com/market/_db', 'bookmarks', 'http://localhost:5984/', 'bookmarks', function(err) {
if (err) console.log('no bookmarks for you');
});
</script>
install(src_db, doc_id, couch_root_url, db_name, options, callback);
Licenece: MIT