Skip to content

Instantly share code, notes, and snippets.

@millisami
Forked from mtylty/store.coffee
Created March 21, 2014 07:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save millisami/9681224 to your computer and use it in GitHub Desktop.
Save millisami/9681224 to your computer and use it in GitHub Desktop.
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