Skip to content

Instantly share code, notes, and snippets.

@aloerina01
Created February 22, 2017 03:24
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/f6a30b740158eb67e976176e916f71e5 to your computer and use it in GitHub Desktop.
Save aloerina01/f6a30b740158eb67e976176e916f71e5 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