Skip to content

Commit

Permalink
Add embedded repica:
Browse files Browse the repository at this point in the history
  • Loading branch information
vixhnuchandran committed Jun 5, 2024
1 parent eec1b11 commit 90be654
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/configs/sqlite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ if (!authToken) {
throw new Error("Environment variable TURSO_AUTH_TOKEN is missing.")
}

// const client: Client = createClient({
// url: localDatabaseUrl,
// syncUrl: databaseUrl,
// authToken: authToken,
// })

const client: Client = createClient({
url: databaseUrl,
url: localDatabaseUrl,
syncUrl: databaseUrl,
authToken: authToken,
})

// const client: Client = createClient({
// url: databaseUrl,
// authToken: authToken,
// })

async function isDatabaseConnected(): Promise<boolean> {
try {
// await client.sync()
await client.sync()

await client.execute("SELECT 1")
console.log("Connected to the SQLite database.")
Expand Down

0 comments on commit 90be654

Please sign in to comment.