---
# System prepended metadata

title: 環境設定
tags: [程式片段]

---

# 環境設定

###### tags: `程式片段`

```javascript=

const configFileMap = {
  local: '.env.local',
  staging: '.env.staging',
  production: '.env.production'
};

require('dotenv').config({ path: configFileMap[process.env.EGG_SERVER_ENV] });
```