Skip to content

Commit

Permalink
[Elysia] Use Bun's SQL API (#9572)
Browse files Browse the repository at this point in the history
* Use Bun's SQL API for Elysia

* Upgrade bun to 1.2
  • Loading branch information
Nicell authored Mar 3, 2025
1 parent b59d741 commit 6a4f703
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion frameworks/TypeScript/elysia/elysia-compiled.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM oven/bun:1.1
FROM oven/bun:1.2

EXPOSE 8080

Expand Down
2 changes: 1 addition & 1 deletion frameworks/TypeScript/elysia/elysia-postgres.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM oven/bun:1.1
FROM oven/bun:1.2

EXPOSE 8080

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM oven/bun:1.1
FROM oven/bun:1.2

EXPOSE 8080

Expand Down
2 changes: 1 addition & 1 deletion frameworks/TypeScript/elysia/elysia.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM oven/bun:1.1
FROM oven/bun:1.2

EXPOSE 8080

Expand Down
9 changes: 3 additions & 6 deletions frameworks/TypeScript/elysia/src/postgres.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import postgres from "postgres";
import { SQL } from "bun";
import { rand } from "./db-handlers";
import type { Fortune, World } from "./types";

const sql = postgres({
host: "tfb-database",
user: "benchmarkdbuser",
password: "benchmarkdbpass",
database: "hello_world",
const sql = new SQL({
url: "postgres://benchmarkdbuser:benchmarkdbpass@tfb-database:5432/hello_world",
max: 1,
});

Expand Down

0 comments on commit 6a4f703

Please sign in to comment.