cerebral-hoodie

0.2.0 • Public • Published

cerebral-hoodie

Hoodie-powered persistent store with sync API package for Cerebral

NPM version

Install

npm install cerebral-hoodie

Usage

var controller = require('./controller')
import Hoodie, { Store } from 'cerebral-hoodie'
 
const store = new Store('dbName', {
  remoteBaseUrl: location.origin + '/api'
})
 
controller.register({
  hoodie: Hoodie(store, {
    path: ['data'], // where to sync hoodie.store
    connect: true   // auto-connect to remote store after attach
  })
})

Do not mutate synced objects in cerebral's state store. Use hoodie.store.* API exposed as service instead.

/cerebral-hoodie/

    Package Sidebar

    Install

    npm i cerebral-hoodie

    Weekly Downloads

    0

    Version

    0.2.0

    License

    MIT

    Last publish

    Collaborators

    • cerebral.js
    • christianalfoni
    • guria