@lucidcms/db-libsql
v1.0.2
Published
The official LibSQL database adapter for Lucid CMS
Maintainers
Readme
Lucid CMS - LibSQL Database Adapter
The official LibSQL database adapter for Lucid CMS
The Lucid CMS LibSQL database adapter allows you to use LibSQL as your database. This registers a slightly modified version of the LibSQL dialect for Kysely.
Installation
npm install @lucidcms/db-libsqlSetup
To use the LibSQL database adapter, you must add it to your Lucid CMS configuration file. You'll need to provide the database URL and, optionally, an authentication token.
import { configureLucid } from "@lucidcms/core";
import { node } from "@lucidcms/runtime-node";
import { libsql } from "@lucidcms/db-libsql";
export default configureLucid({
runtime: node,
db: libsql,
config: () => ({
// ...other config
}),
});Configuration
The no-call db: libsql form reads LIBSQL_URL and optional LIBSQL_AUTH_TOKEN from Lucid's resolved env. You can also pass a configuration object or env callback via libsql() with the following options:
| Property | Type | Description |
|----------|------|-------------|
| url * | string | The LibSQL database URL (e.g., libsql://your-database.turso.io) |
| authToken | string | Authentication token for accessing the database |
