Svelte and SvelteKit 5 · SvelteKit

Read a private environment variable

Variables from $env/static/private can only be imported in server code.

import { DATABASE_URL } from "$env/static/private";

Official Svelte and SvelteKit 5 documentation

More sveltekit commands

All sveltekit commands · Svelte and SvelteKit 5 cheatsheet

Was this page helpful?