Environment Variables
Learn more about the environment variables and how they are used. This guide contains the necessary environment variables that you need to change for your app to work.
.env
| Name | Description | Values |
|---|---|---|
| PORT | The port your app will run on | 9712 |
| NUXT_PUBLIC_SITE_URL | The URL of your app | https://yourwebsite.com |
| NUXT_PUBLIC_APP_NAME | App name | myappname |
| NUXT_PUBLIC_APP_LOGO | Use this if you have image logo | |
| NUXT_PUBLIC_APP_ICON | Use this instead if you want to use an icon | possible values from https://icones.js.org/ |
| NUXT_PUBLIC_DOMAIN_NAME | Same as the url of your app but without any subdomains | yourwebsite.com |
| NUXT_PUBLIC_DIRECTUS_URL | The URL of your directus instance | https://app.yourwebsite.com |
| NUXT_DIRECTUS_STATIC_TOKEN | The static token of your admin account in Directus. Get it from Users > Admin > Token > Click on generate | xxxxxxxxxxxxxx |
| NODE_TLS_REJECT_UNAUTHORIZED | Set to 0 on development to use self-signed certificates. Remove this in production | 0 |
| NUXT_PAYMENT_TEST_MODE | Set to true to run payments in test mode | true |
backend/.env
| Name | Description | Values |
|---|---|---|
| SECRET | Secret used for session | Generate random secret |
| PUBLIC_URL | The URL of your directus instance | https://app.yourwebsite.com |
| CORS_ORIGIN | Make sure to set all your allowed origins here | https://yourwebsite.com, https://app.yourwebsite.com, |
Directus has a good documentation on the environment files in this file. Check out Directus Docs