Sails.js and Ember.js integration

ember.js, sails.js

Solution

I can't speak for the "change what Ember expects" option, but I can say that this is precisely what blueprint overrides in Sails were invented for. This would be a perfectly reasonable way to make your app Ember-compatible.

Also keep in mind that all of the CRUD blueprints use the `res.ok()` response to actually send data down to the client; if you like, you can just override that with your own `api/responses/ok.js`, perhaps using `req.url` to determine the resource that was being requested, and use that to wrap your JSON object in the manner that Ember expects.

Problem

Has anyone tried to use sails as ember's backend API? How would you go about it? Is there an example available? Since Sails has a different format in its built-in blueprints, is it better to make sails rest json format confirm to what ember expects or the other way around? Thanks! Edit So there are two approaches: change the sails format, maybe with: CRUD blueprint overriding in sails.js change what ember expects: http://discuss.emberjs.com/t/sails-js-as-the-backend/5233

Original source

Related problems