mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-19 09:34:18 +01:00
This package is for serverless access to the Turso Cloud using SQL over HTTP protocol. The purpose of this package is to provide the same interface as `@tursodatabase/turso`, but for serverless environments that cannot host the database engine. The package also provides a `@libsql/client` compatibility layer in the `@tursodatabase/serverless/compat` module for drop-in replacement for existing clients.
Remote
This example demonstrates how to use Turso Cloud.
Install Dependencies
npm i
Running
Execute the example:
TURSO_DATABASE_URL="..." TURSO_AUTH_TOKEN="..." node index.mjs
This will connect to a remote SQLite database, insert some data, and then query the results.