File tree Expand file tree Collapse file tree 2 files changed +13
-20
lines changed Expand file tree Collapse file tree 2 files changed +13
-20
lines changed Original file line number Diff line number Diff line change 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 `
Original file line number Diff line number Diff line change @@ -10,8 +10,7 @@ import * as Sentry from "@sentry/node";
1010import { libsqlIntegration } from "../src" ;
1111
1212const libsqlClient = createClient ( {
13- url : "libsql://..." ,
14- authToken : "..." ,
13+ url : "file:dev.db" ,
1514} ) ;
1615
1716Sentry . init ( {
@@ -26,10 +25,12 @@ Sentry.init({
2625} ) ;
2726
2827libsqlClient
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 ) ;
3433libsqlClient . 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);
You can’t perform that action at this time.
0 commit comments