Skip to content

Commit 9b10841

Browse files
authored
Use Bun's SQL API for Elysia
1 parent 523534b commit 9b10841

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

frameworks/TypeScript/elysia/src/postgres.ts

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
import postgres from "postgres";
1+
import { SQL } from "bun";
22
import { rand } from "./db-handlers";
33
import type { Fortune, World } from "./types";
44

5-
const sql = postgres({
6-
host: "tfb-database",
7-
user: "benchmarkdbuser",
8-
password: "benchmarkdbpass",
9-
database: "hello_world",
5+
const sql = new SQL({
6+
url: "postgres://benchmarkdbuser:benchmarkdbpass@tfb-database:5432/hello_world",
107
max: 1,
118
});
129

0 commit comments

Comments
 (0)