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 { defineConfig } from 'drizzle-kit'; import { defineConfig } from 'drizzle-kit';
import '@/lib/env-config';
const DATABASE_URL = process.env.POSTGRES_URL; const DATABASE_URL = process.env.POSTGRES_URL;
if (!DATABASE_URL) { if (!DATABASE_URL) {

View File

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

View File

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

View File

@@ -16,6 +16,7 @@
"format:write": "prettier --write \"**/*.{ts,tsx,js,jsx,mdx}\" --cache" "format:write": "prettier --write \"**/*.{ts,tsx,js,jsx,mdx}\" --cache"
}, },
"dependencies": { "dependencies": {
"@next/env": "^16.0.3",
"@radix-ui/react-dialog": "^1.1.15", "@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-label": "^2.1.8", "@radix-ui/react-label": "^2.1.8",
"@radix-ui/react-select": "^2.2.6", "@radix-ui/react-select": "^2.2.6",

3
pnpm-lock.yaml generated
View File

@@ -12,6 +12,9 @@ importers:
.: .:
dependencies: dependencies:
'@next/env':
specifier: ^16.0.3
version: 16.0.3
'@radix-ui/react-dialog': '@radix-ui/react-dialog':
specifier: ^1.1.15 specifier: ^1.1.15
version: 1.1.15(@types/react-dom@19.2.3(@types/react@19.2.5))(@types/react@19.2.5)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) version: 1.1.15(@types/react-dom@19.2.3(@types/react@19.2.5))(@types/react@19.2.5)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)