flybase-js
v0.20.0
Published
JS is the isomorphic Flybase library
Downloads
4
Readme
Flybase-js
JS is the isomorphic Flybase library
This library combines the flybase-js and flybase-node libraries into one single intermingable isomorphic library.
Installation
NPM
To install via NPM:
npm install flybase-js --save
CDN
To install with a CDN (content delivery network) add the following scripts to the bottom of your <body>
tag, but before you use any Flybase services:
<script src="https://cdn.jsdelivr.net/npm/flybase-js"></script>
or even:
<script src="https://unpkg.com/flybase-js"></script>
Getting Started
<html>
<head>
<script src="node_modules/flybase-js/dist/js/flybase.js"></script>
</head>
<script>
const flybase = new Flybase({
apiKey: 'YOUR_API_KEY',
database: 'YOUR-APP',
collection: 'YOUR-COLLECTION'
});
flybase.print();
</script>
</html>
Server
const Flybase = require("flybase-js");
const flybase = new Flybase({
apiKey: 'YOUR_API_KEY',
database: 'YOUR-APP',
collection: 'YOUR-COLLECTION'
});
flybase.print();