Skip to main content


Showing posts from August, 2014

EmberJS development using the esapiserver

I started out using the fixture and local storage adapters in EmberJS, but experienced that the limitations that these adapters have, would turn out be a pain later when it was time to release my app - I wanted to make sure that what I test, was consistant with what I would release, hence the esapiserver. InstallationInstall the gem $ gem install esapiserver Start up your mongoDB server $ mongoD Start the Ember Sinatra/MongoDB API server $ easapiserver EmberJS To get EmberJS and the esapiserver to play together, we need to configure our RESTAdapter App.ApplicationAdapter = DS.RESTAdapter.extend namespace: 'api' host: '' corsWithCredentials: true Because we are using an "external server", we have to enable CORS support in EmberJS. (more about that here) Now, lets assume that we have the following model setup in EmberJS: App.Post = DS.Model.extend content: DS.attr('string') comments: DS.hasMany(&#…