Skip to main content
Nuxt banner Before you start, make sure you:
1

Install the libSQL SDK

Begin by installing the @libsql/client dependency in your project:
2

Configure database credentials

Get the database URL:
Get the database authentication token:
Assign credentials to the environment variables inside .env.
3

Configure variables inside Nuxt's runtime config.

nuxt.config.ts
Make sure that names of the keys in the runtimeConfig object match the names of your environment variables. Read more about this here.
4

Configure libSQL Client.

server/utils/turso.ts
5

Execute SQL

server/api/items.get.ts

Examples

Website + App

See the full source code