<!-- Source: https://www.wappi.dev/environment-variables -->

# Environment Variables

You need a `.env` file in your project root.

Your `.env` is built from the `.env.example`. You need to keep the keys in the `.env.example` up to date at all times. If it's not kept up to date, it may fail on deployment or fail to run locally.

#### ENVIRONMENT

Either: `localhost` | `dev` | `stage` | `prod`
This allows you to run your local code as if it's running on production to find performance issues.
*Rebuild when you change this*

```bash
ENVIRONMENT='localhost'
```

#### SHOW_LOGS

Show Logs is for development or bug fixing.
Recommended: localhost = true; prod = false.
Showing logs will display the body data. So it's a security risk to show on production

```bash
SHOW_LOGS=true
```

#### AUTH_KEY_CURRENT, AUTH_KEY_PREVIOUS

Default FallBack - You should set these to rotate using AWS Secrets Manager.
See[Security > Auth Keys](https://www.wappi.dev/security/auth-keys)for more information.

```bash
AUTH_KEY_CURRENT='asdf'
AUTH_KEY_PREVIOUS='asdf'
```

#### Auto sync `types.ts` files to frontend instantly

Internal Frontend Project Paths.
This is the path that the built types files will be automatically copied over to when you run wappi locally. Allowing the types files to always stay in sync.
*Only for Local Environment*

```bash
FRONTEND_PROJECT_PATHS=['']
```

Example

```bash
FRONTEND_PROJECT_PATHS=["/Path/To/My/Website/src/API", "/Path/To/My/adminWebsite/src/API"]
```

URL: https://www.wappi.dev/environment-variables
