Skip to content

Instantly share code, notes, and snippets.

@millisami
Created January 23, 2015 11:30
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/f9e99c45f8fdf144d0fb to your computer and use it in GitHub Desktop.
Save millisami/f9e99c45f8fdf144d0fb to your computer and use it in GitHub Desktop.
Access configurable values in emberjs ember-cli
# app/adapters/application.js
import DS from 'ember-data';
import config from '../config/environment';
export default DS.ActiveModelAdapter.extend({
host: config.apiUrl
});
if (environment === 'production') {
ENV.apiUrl = 'http://cabbyguide.herokuapp.com/api/v1';
ENV.production = true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment