Skip to content

Commit 6c998dd

Browse files
committed
docs(demo): update readme
1 parent 9c7be2a commit 6c998dd

File tree

2 files changed

+13
-20
lines changed

2 files changed

+13
-20
lines changed

demo/README.md

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
1-
# demo
1+
# Sentry + libSQL Integration
22

3-
To install dependencies:
3+
## Setup
44

5-
```bash
6-
bun install
7-
```
8-
9-
To run:
10-
11-
```bash
12-
bun run index.ts
13-
```
14-
15-
This project was created using `bun init` in bun v1.0.15. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.
5+
1. Install dependencies using `bun install`
6+
2. Add Sentry DSN to `index.ts`
7+
3. Run `bun run index.ts`

demo/index.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import * as Sentry from "@sentry/node";
1010
import { libsqlIntegration } from "../src";
1111

1212
const libsqlClient = createClient({
13-
url: "libsql://...",
14-
authToken: "...",
13+
url: "file:dev.db",
1514
});
1615

1716
Sentry.init({
@@ -26,10 +25,12 @@ Sentry.init({
2625
});
2726

2827
libsqlClient
29-
.execute("CREATE TABLE IF NOT EXISTS users (name)")
30-
.then(console.log);
31-
libsqlClient
32-
.execute(`INSERT INTO users (name) VALUES ("Jamie")`)
28+
.batch([
29+
"CREATE TABLE IF NOT EXISTS users (name TEXT)",
30+
"INSERT INTO users (name) VALUES ('Jamie')",
31+
])
3332
.then(console.log);
3433
libsqlClient.execute("SELECT * FROM users").then(console.log);
35-
libsqlClient.execute("SELECT * FROM tabledoesntexist").then(console.log);
34+
35+
// uncomment to invoke error
36+
// libsqlClient.execute("SELECT * FROM tabledoesntexist").then(console.log);

0 commit comments

Comments
 (0)