Created
January 30, 2014 14:25
-
-
Save mtylty/8709464 to your computer and use it in GitHub Desktop.
tapas-with-ember store file with support for multiple environments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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