- 
                Notifications
    You must be signed in to change notification settings 
- Fork 19
Config
        Bill Heaton edited this page Jun 15, 2015 
        ·
        1 revision
      
    See the test application's config/environment file.
A few ENV variables are necessary:
  var ENV = {
    /* ... */
    EmberENV: {
      FEATURES: {},
      MODEL_FACTORY_INJECTIONS: true
    },
    APP: {
      API_HOST: '/',
      API_HOST_PROXY: 'http://api.pixelhandler.com/',
      API_PATH: 'api/v1',
    },
    contentSecurityPolicy: {
      'connect-src': "'self' api.pixelhandler.com localhost:3000"
    }
  };The initializers created when you use ember generate resource will need MODEL_FACTORY_INJECTIONS: true to make it possible for you to inject dependencies into a model factory (a prototype extended by the Resource base prototype)
A few ENV.APP variables will assist with URL generating and manipulation if necessary: API_HOST, API_HOST_PROXY, API_PATH. See an Adapter file that is created when you generate a resource. Here is a Post Adapter from the test application.
Your contentSecurityPolicy may need to include the URL for the API you connect to.