Files
turso/packages/turso-serverless/examples/remote
Pekka Enberg 7765bafb13 Add @tursodatabase/serverless package
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.
2025-07-21 22:03:43 +03:00
..

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.