hoodiehq-archive / hoodie-account

Showcase of a standalone server using only Account Client/Server
Apache License 2.0
0 stars 8 forks source link

Could hoodie-account integrated with Ember.js? #16

Open laplaceliu opened 8 years ago

laplaceliu commented 8 years ago

Ember has no account solution itself, so that I want to use hoodie-account as Ember's account solution. Could you tell me that my thoughts are realistic or not?

gr2m commented 8 years ago

@laplaceliu yes that should be possible :) I don’t have a lot of experience with ember, but I think you can install npm modules into your ember app, right?

Install with npm install --save @hoodie/account. Then in the client code, you can do

var Account = require('@hoodie/account/client')

Then see all docs here: https://github.com/hoodiehq/hoodie-account-client

For the server part, if you use Hapi, you can do

server.register({
    register: require('@hoodie/account/server'),
    options: options
})

See all docs for the hapi server plugin here: https://github.com/hoodiehq/hoodie-account-server/tree/master/plugin

If you have different repositories for your backend and frontend apps, you can also install @hoodie/account-server and @hoodie/account-client as separate modules.

I’d love to see if you get it to work :) Let me know if you have any farther questions.

By the way, we are also migrating our Hoodie’s admin dashboard to the new Hoodie, and are using Ember for it. Let me know if you’d like to get involved :)

fivetanley commented 8 years ago

@laplaceliu If you need npm modules in your ember app, you'll need to use ember-browserify to get it loaded, but otherwise you should be able to look at Gregor's instructions.

@gr2m the admin dashboard sounds interesting!

gr2m commented 8 years ago

check out https://github.com/hoodiehq/hoodie-admin for the work in new admin dashboard app (work in progress) made with ember