Skip to content

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

NameDescriptionValues
PORTThe port your app will run on9712
NUXT_PUBLIC_SITE_URLThe URL of your apphttps://yourwebsite.com
NUXT_PUBLIC_APP_NAMEApp namemyappname
NUXT_PUBLIC_APP_LOGOUse this if you have image logo
NUXT_PUBLIC_APP_ICONUse this instead if you want to use an iconpossible values from https://icones.js.org/
NUXT_PUBLIC_DOMAIN_NAMESame as the url of your app but without any subdomainsyourwebsite.com
NUXT_PUBLIC_DIRECTUS_URLThe URL of your directus instancehttps://app.yourwebsite.com
NUXT_DIRECTUS_STATIC_TOKENThe static token of your admin account in Directus. Get it from Users > Admin > Token > Click on generatexxxxxxxxxxxxxx
NODE_TLS_REJECT_UNAUTHORIZEDSet to 0 on development to use self-signed certificates. Remove this in production0
NUXT_PAYMENT_TEST_MODESet to true to run payments in test modetrue

backend/.env

NameDescriptionValues
SECRETSecret used for sessionGenerate random secret
PUBLIC_URLThe URL of your directus instancehttps://app.yourwebsite.com
CORS_ORIGINMake sure to set all your allowed origins herehttps://yourwebsite.com, https://app.yourwebsite.com,

Directus has a good documentation on the environment files in this file. Check out Directus Docs