ember-hoodie
Use hoodie seamlessly with Ember.js
Installing
npm install -S ember-hoodie
Usage
// app/application/controller.js;const Controller inject: service } = Ember; ;
and in your application serializer
// app/serializers/application.js; JSONSerializer;
// app/services/store.js; ;
If you want ember server
to start the Hoodie Server for you, you have to configure
ENV.hoodie.server
.
// config/environment.js var PouchDB = ; if environment === 'development' ENVhoodie = client: url: 'http://localhost:4200' server: PouchDB: PouchDB paths: public: 'dist'
The ENV.hoodie.server
property is the exact hoodie-server config that will be passed as hapi's register
options. So you can pass whatever options you need here. For example, to make hoodie act as a proxy to a couchdb, you can use:
ENVhoodie = client: url: 'http://localhost:4200' server: PouchDB: PouchDB port: 4201 paths: {} ;
Now, you can just use the store as you are used to! Whabam! Please help me fill out these docs a little better.
Hacking locally
git clone
this repositorynpm install
bower install