Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
env = require 'config/environment'
if env.isDevelopment()
window.App.ApplicationAdapter = DS.RESTAdapter.extend({
host: 'http://localhost:3000'
})
else if env.isTest()
window.App.ApplicationAdapter = DS.FixtureAdapter.extend({
simulateRemoteResponse: false
})
else if env.isStaging()
window.App.ApplicationAdapter = DS.RESTAdapter.extend({
host: 'http://www.staging-app.com/api/v1'
})
else
window.App.ApplicationAdapter = DS.RESTAdapter.extend({
host: 'https://www.production-app.com/api/v1'
})
module.exports = App.ApplicationAdapter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment