Last active
October 19, 2022 00:19
-
-
Save cotyhamilton/1ed2b9025c51979ec452df4566c69ce6 to your computer and use it in GitHub Desktop.
SvelteKit Env Vars - +layout.server.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { env } from "$env/dynamic/private"; | |
import type { LayoutServerLoad } from "./$types"; | |
export const load: LayoutServerLoad = async () => { | |
return { | |
configuration: { | |
environment: env.ENVIRONMENT, | |
displayEnvironment: env.DISPLAY_ENVIRONMENT?.toLowerCase() === "true" | |
} | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment