This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { defineConfig } from 'drizzle-kit';
|
||||
import '@/lib/env-config';
|
||||
|
||||
const DATABASE_URL = process.env.POSTGRES_URL;
|
||||
if (!DATABASE_URL) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { cookies } from 'next/headers';
|
||||
import '@/lib/env-config';
|
||||
|
||||
const TOKEN_COOKIE_NAME = 'habit-tracker-token';
|
||||
const TOKEN_COOKIE_OPTIONS = {
|
||||
|
||||
@@ -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
4
lib/env-config.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import { loadEnvConfig } from '@next/env';
|
||||
|
||||
const projectDir = process.cwd();
|
||||
loadEnvConfig(projectDir);
|
||||
@@ -16,6 +16,7 @@
|
||||
"format:write": "prettier --write \"**/*.{ts,tsx,js,jsx,mdx}\" --cache"
|
||||
},
|
||||
"dependencies": {
|
||||
"@next/env": "^16.0.3",
|
||||
"@radix-ui/react-dialog": "^1.1.15",
|
||||
"@radix-ui/react-label": "^2.1.8",
|
||||
"@radix-ui/react-select": "^2.2.6",
|
||||
|
||||
3
pnpm-lock.yaml
generated
3
pnpm-lock.yaml
generated
@@ -12,6 +12,9 @@ importers:
|
||||
|
||||
.:
|
||||
dependencies:
|
||||
'@next/env':
|
||||
specifier: ^16.0.3
|
||||
version: 16.0.3
|
||||
'@radix-ui/react-dialog':
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user