- Retrieve database credentials
- Install the libSQL package
- Connect to a Turso database
- Execute a query using SQL
- Sync changes to local database (optional)
Retrieve database credentials
You will need an existing database to continue. If you don’t have one, create one.
Get database URL
Get database URL
Create database auth token
Create database auth token
You will want to store these as environment variables.
Connect
Then import the package:Now connect to your local or remote database using the libSQL connector:
Embedded Replicas
Embedded Replicas
Local only
Local only