All jobs / Full-stack developer / DevOps Basics

Full-stack developer interview question · 0–1 years

Someone wants to put the API URL and the database password in `.env` for Vite.

What can go in the frontend env?

The strongest answer

The public API base URL — anything in a `VITE_` / `NEXT_PUBLIC_` variable is visible in the downloaded JS

Why it works

Exactly. Frontend env is not a secret store. Put only what a stranger with View Source may see.

What a good answer covers

Answers that fall short

Who gets asked this

More DevOps Basics questions