Skip to content

Configuration

The frontend is based on a standard Vite + Vue3 install and leverages the built in support for .env files. Vite does something slightly different than what you'd expect using node and process.env. All configs are in /frontend/.env.local.

Available Configurations

ENV VARDescriptionDefault
VITE_SITE_NAMEThis is the string name of your site/application.
VITE_API_HOSTThe host name and port for the backend api

Using Env Vars During Development

You have access to all of these configurations via the standard Vite import.meta.env object. For more details about how Vite handles .env vars, read the Vite Docs

js
const siteName = import.meta.env.VITE_SITE_NAME

Production Deployment

It's generally a good idea to exclude your .env from your source code repo. As such, StarterStack includes the .env file in the .gitignore file. When deploying your application to production it's a common practice to set these as environment variables on your server. Of course, you can still choose to use .env files in production.