Skip to content

Commit

Permalink
SKIP_ENV_VALIDATION
Browse files Browse the repository at this point in the history
  • Loading branch information
mauriciabad committed Apr 7, 2024
1 parent 8dc78af commit e1a8128
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drizzle.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ import path from 'node:path'
dotenv.config({ path: path.resolve(process.cwd(), '.env.local') })
dotenv.config({ path: path.resolve(process.cwd(), '.env') })

if (!process.env.DATABASE_URL)
throw new Error('Missing environment variable DATABASE_URL')
if (process.env.SKIP_ENV_VALIDATION !== 'true') {
if (!process.env.DATABASE_URL)
throw new Error('Missing environment variable DATABASE_URL')
}

export default {
schema: './src/server/db/schema/*',
out: './drizzle',
driver: 'pg',
dbCredentials: {
connectionString: process.env.DATABASE_URL,
connectionString: process.env.DATABASE_URL!,
},
} satisfies Config
2 changes: 2 additions & 0 deletions src/server/api/router/admin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ export const adminRouter = router({
routes: routesAdminRouter,
images: imagesAdminRouter,
})

hola

0 comments on commit e1a8128

Please sign in to comment.