web: add env variable & plausible functionality

This commit is contained in:
wukko
2024-07-14 22:50:18 +06:00
parent 436b735d2a
commit 128ab388f3
3 changed files with 35 additions and 13 deletions

9
web/src/lib/env.ts Normal file
View File

@@ -0,0 +1,9 @@
import { env } from "$env/dynamic/public";
const variables = {
HOST: env.PUBLIC_HOST,
PLAUSIBLE_HOST: env.PUBLIC_PLAUSIBLE_HOST,
PLAUSIBLE_ENABLED: env.PUBLIC_HOST && env.PUBLIC_PLAUSIBLE_HOST,
}
export default variables;