Skip to content

Instantly share code, notes, and snippets.

@aloerina01
Created February 22, 2017 03:10
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 aloerina01/827895f64fc549cf70fe91d3162a2d09 to your computer and use it in GitHub Desktop.
Save aloerina01/827895f64fc549cf70fe91d3162a2d09 to your computer and use it in GitHub Desktop.
NODE_ENVを見て読み込むファイルを切り替える方法
const config = require('./_' + process.env.NODE_ENV);
export default class Environment {
static get API_ORIGIN() {
return config.API_ORIGIN;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment