env config
All checks were successful
Lint / Lint and Check (push) Successful in 41s

This commit is contained in:
2025-11-15 17:23:10 +01:00
parent 2f6b0ed098
commit 5bb861d881
6 changed files with 11 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
import { cookies } from 'next/headers';
import '@/lib/env-config';
const TOKEN_COOKIE_NAME = 'habit-tracker-token';
const TOKEN_COOKIE_OPTIONS = {

View File

@@ -1,5 +1,6 @@
import { drizzle } from 'drizzle-orm/node-postgres';
import * as schema from './schema';
import '@/lib/env-config';
const DATABASE_URL = process.env.POSTGRES_URL;
if (!DATABASE_URL) {

4
lib/env-config.ts Normal file
View File

@@ -0,0 +1,4 @@
import { loadEnvConfig } from '@next/env';
const projectDir = process.cwd();
loadEnvConfig(projectDir);