Env Variables

Defining and using environment-specific configuration variables within code files is less than ideal due to security reasons as well as the coupling of environment-specific configuration.

Boostack is designed to use one .env file to handle both development and production mode.

That way, when your application starts, it reads the variables that are stored in the .env for your target environment in the most secure and reliable way.

Your .env.example file will contain the following empty variables that must be filled out. You will find descriptions of where your variable value should go.

#VUE_APP_API_URL= YOUR BACKEND URL eg-> http://localhost:3001
#CLIENT_URL= YOUR FRONTEND URL eg-> http://localhost:8080
#DEVELOPMENT_DB_DSN= YOUR DEV CONNECTION STRING
#PRODUCTION_DB_DSN= YOUR PROD CONNECTION STRING
#TOKEN_SECRET_DEV=your-development-secret
#TOKEN_SECRET_PROD=your-production-secret
#API_KEY_MAILGUN= API KEY FROM MAILGUN
#FROM_WHO_MAIL=TEST SENDER eg-> [email protected]
#MAILGUN_DOMAIN=YOUR MAILGUN DOMAIN NAME eg-> sandbox0c1example.mailgun.org
#RESET_PASSWORD_KEY=CHOOSE KEY FOR TOKEN TO RESET PASSWORD FOR USER
#STRIPE_API_KEY=YOUR STRIPE API KEY eg->sk_test_51Hqexample
#STRIPE_PUBLISHABLE_KEY=YOUR STRIPE PK pk_test_51Hq3cexample
#STRIPE_WEBHOOK_SECRET=YOUR SEC WEBHOOK whsec_S33example (optional)
#AWS_ACCESS_KEY_ID=YOUR AWS S3 ACCESS KEY
#AWS_SECRET_KEY=YOUR AWS S3 ACCESS KEY

Don't forget to remove .example from your .env file.

Last updated

Was this helpful?