SvelteKit Kitchen Sink

Environment Variable Page

This page demonstrates server-side environment variable access using SvelteKit's $env/static/private. The variable is only accessible on the server and is not exposed to the client bundle.

MY_TEST_VAR Value

Request Time: 12/8/2025, 5:59:48 PM

Security Note:

This variable is imported from $env/static/private, ensuring it's never sent to the client. Set the value in your .env file.

Configuration

To set this variable:

  1. Create a .env file in the project root
  2. Add: MY_TEST_VAR=your-value-here
  3. Or set it as an environment variable in your deployment platform

Back to Home