Build awesome offline-first Ember apps with Hoodie!
JavaScript HTML CSS
Permalink
Failed to load latest commit information.
addon fix: do not try to get properties from already deleted records Oct 2, 2016
app feat: Add a hoodie DS.Store and DS.Adapter May 31, 2016
blueprints feat: Add .hoodie to .gitignore on install May 30, 2016
config Initial Commit from Ember CLI v2.6.0-beta.2 May 20, 2016
tests Add a dummy app Aug 13, 2016
vendor fix: include hoodie.js from npm to allow updates Jun 1, 2016
.bowerrc Initial Commit from Ember CLI v2.6.0-beta.2 May 20, 2016
.editorconfig Initial Commit from Ember CLI v2.6.0-beta.2 May 20, 2016
.ember-cli Initial Commit from Ember CLI v2.6.0-beta.2 May 20, 2016
.gitignore chore(gitignore): .hoodie Jul 21, 2016
.jshintrc Initial Commit from Ember CLI v2.6.0-beta.2 May 20, 2016
.npmignore
.travis.yml test(travis): add node 6 to our test matrix Oct 26, 2016
.watchmanconfig Initial Commit from Ember CLI v2.6.0-beta.2 May 20, 2016
LICENSE.md Initial Commit from Ember CLI v2.6.0-beta.2 May 20, 2016
README.md feat: read client config (#20) Aug 27, 2016
bower.json feat(deprecation): move ember-cli-test-loader to npm, update to 1.1.0 Sep 22, 2016
ember-cli-build.js
index.js feat: ENV.hoodie.server Aug 4, 2016
package.json
testem.js Initial Commit from Ember CLI v2.6.0-beta.2 May 20, 2016

README.md

ember-hoodie

Use hoodie seamlessly with Ember.js

Build Status Dependency Status devDependency Status

Installing

  • npm install -S ember-hoodie

Usage

// app/application/controller.js
import Ember from 'ember';
const {
  Controller,
  inject: { service }
} = Ember;

export default Controller.extend({
  hoodieAccount: service('hoodie-account'),

  actions: {
    signIn(username, password) {
      this.get('hoodieAccount').signIn({username, password});
    },

    signOut() {
      this.get('hoodieAccount').signOut();
    }
  }
});
// app/services/store.js
import HoodieStore from 'ember-hoodie/services/store';

export default HoodieStore;

If you want ember server to start the Hoodie Server for you, you have to configure ENV.hoodie.server.

// config/environment.js
if (environment === 'development') {
  ENV.hoodie = {
    client: {},
    server: { // https://github.com/hoodiehq/hoodie#hapi-plugin
      port: 4201
    }
  }
}

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 repository
  • npm install
  • bower install