Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lambtron committed Nov 12, 2024
1 parent 097421a commit 32f83f4
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions with-drizzle/src/db/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,13 @@ import pg from "pg";
import { integer } from "drizzle-orm/sqlite-core";
import { eq } from "drizzle-orm/expressions";

const { Client } = pg;
const { Pool } = pg;

// Instantiate Drizzle client.
export const db = drizzle({
// Using `connectionString` to instantiate a client results in Top-level await promise never resolved error.
client: new Client({
client: new Pool({
connectionString: Deno.env.get("DATABASE_URL"),
}),

// The below works.
schema: { dinosaurSchema, taskSchema, dinosaursRelations, tasksRelations },
});

Expand Down

1 comment on commit 32f83f4

@deno-deploy
Copy link

@deno-deploy deno-deploy bot commented on 32f83f4 Nov 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failed to deploy:

Module not found "file:///src/with-nanojsx/main.tsx".

Please sign in to comment.