switch from RUNTIME_ENVIRONMENT to standard NODE_ENV

This commit is contained in:
Torben Haack 2024-10-09 11:13:05 +02:00
parent c7683a1a6e
commit 7f1dc7ccc9
2 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@ export const lucia = new Lucia(adapter, {
sessionCookie: {
expires: false,
attributes: {
secure: env.RUNTIME_ENVIRONMENT === "prod",
secure: env.RUNTIME_ENVIRONMENT === "production",
},
},
getUserAttributes: (attributes) => {

View File

@ -4,8 +4,8 @@ import { z } from "zod";
* Environment variables
*/
export const env = {
RUNTIME_ENVIRONMENT: z.enum(["prod", "dev"]).parse(process.env.RUNTIME_ENVIRONMENT),
DB_PATH: "db/sqlite.db", // As drizzle-kit currently can't load env variables, use a hardcoded value
RUNTIME_ENVIRONMENT: z.enum(["production", "dev"]).parse(process.env.NODE_ENV),
DB_PATH: "db/sqlite.db",
OAUTH: {
CLIENT_ID: z.string().parse(process.env.OAUTH_CLIENT_ID),
CLIENT_SECRET: z.string().parse(process.env.OAUTH_CLIENT_SECRET),