Skip to content

Commit

Permalink
fix: db singleton on development
Browse files Browse the repository at this point in the history
  • Loading branch information
dyzhuu committed Oct 15, 2024
1 parent 6339c79 commit badca2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/db/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ declare global {

let db: PostgresJsDatabase<typeof schema & typeof relations>;

if (env.ENVIRONMENT === "PRODUCTION") {
if (process.env.NODE_ENV === "production") {
db = drizzle(postgres(env.DATABASE_URL), {
schema: {
...schema,
Expand Down

0 comments on commit badca2f

Please sign in to comment.