Skip to content

Instantly share code, notes, and snippets.

@mtylty
Created January 30, 2014 14:25
Show Gist options
  • Save mtylty/8709464 to your computer and use it in GitHub Desktop.
Save mtylty/8709464 to your computer and use it in GitHub Desktop.
tapas-with-ember store file with support for multiple environments
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