JSPM

@content-workers/libsql-adapter

1.0.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q24929F
  • License MIT

The official LibSQL adapter for Lucid CMS

Package Exports

  • @content-workers/libsql-adapter

Readme

Lucid CMS - LibSQL Adapter

The official LibSQL adapter for Lucid CMS

The Lucid CMS LibSQL 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/libsql-adapter

Setup

To use the LibSQL 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 { nodeAdapter, defineConfig } from "@lucidcms/node-adapter";
import LibSQLAdapter from "@lucidcms/libsql-adapter";

export const adapter = nodeAdapter();

export default defineConfig((env) => ({
    db: new LibSQLAdapter({
        url: env.LIBSQL_URL,
        authToken: env.LIBSQL_AUTH_TOKEN,
    }),
    // ...other config
}));

Configuration

The adapter accepts a configuration object 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