mirror of
https://github.com/bartvdbraak/hellob.art.git
synced 2025-04-27 09:31:21 +00:00
feat: add environment variables more consistently
This commit is contained in:
parent
2970033193
commit
97a3051563
2 changed files with 19 additions and 0 deletions
4
.env.example
Normal file
4
.env.example
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# App
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
NEXT_PUBLIC_APP_URL=http://localhost:3000
|
15
env.mjs
Normal file
15
env.mjs
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
import { createEnv } from "@t3-oss/env-nextjs";
|
||||||
|
import { z } from "zod";
|
||||||
|
|
||||||
|
export const env = createEnv({
|
||||||
|
server: {
|
||||||
|
// This is optional because it's only used in development.
|
||||||
|
// See https://next-auth.js.org/deployment.
|
||||||
|
},
|
||||||
|
client: {
|
||||||
|
NEXT_PUBLIC_APP_URL: z.string().min(1),
|
||||||
|
},
|
||||||
|
runtimeEnv: {
|
||||||
|
NEXT_PUBLIC_APP_URL: process.env.NEXT_PUBLIC_APP_URL,
|
||||||
|
},
|
||||||
|
});
|
Loading…
Reference in a new issue