Skip to content

Instantly share code, notes, and snippets.

@davidnguyen11
Created January 21, 2018 08:34
Show Gist options
  • Select an option

  • Save davidnguyen11/7a82f3eae08ad6263a44c9efdfd1f98e to your computer and use it in GitHub Desktop.

Select an option

Save davidnguyen11/7a82f3eae08ad6263a44c9efdfd1f98e to your computer and use it in GitHub Desktop.

Revisions

  1. davidnguyen11 created this gist Jan 21, 2018.
    15 changes: 15 additions & 0 deletions env_config.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    const env = process.env.ENV || 'development';

    const configs = {
    development: {
    api: 'https://api.staging.com',
    },
    staging: {
    api: 'https://api.staging.com',
    },
    production: {
    api: 'https://api.production.com',
    },
    }[env];

    export default configs;