firebase-down
LevelDOWN adapter for Firebase realtime database
A drop-in replacement for LevelDOWN that works with Firebase realtime database.
Can be used as a backend for LevelUP rather than an actual LevelDB store.
Table of Contents
Install
npm install --save firebase-down
Usage
var levelup = var FirebaseDOWN = var firebase = var config = apiKey: "apiKey" databaseURL: "https://databaseName.firebaseio.com" var firebaseApp = firebasevar firebaseDown = var db =
API
`var firebaseDown = FirebaseDOWN(firebaseApp)``
Returns a constructor function that can be passed to levelup
, implements the abstract-leveldown
interface. firebaseApp
should be an instance of firebase.app.App
.
Call levelup with var db = levelup(location, {db: firebaseDown})
where location
should be a string path to a key in a firebase database, e.g. /path/to/key
. The leveldown database will be stored under this key.
Contribute
PRs accepted.
Small note: If editing the Readme, please conform to the standard-readme specification.
License
MIT © Gregor MacLennan