Package Exports
- @libsql/client
- @libsql/client/lib/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@libsql/client) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
libSQL driver for TypeScript and JavaScript
Getting Started
To get started, you need sqld
running somewhere. Then:
import { connect } from "@libsql/client"
const config = {
url: "http://localhost:8080"
};
const db = connect(config);
const rs = await db.execute("SELECT * FROM users");
console.log(rs);
You can also just run against local SQLite with:
import { connect } from "@libsql/client"
const config = {
url: "file:example.db" // Use "file::memory:" for in-memory mode.
};
const db = connect(config);
const rs = await db.execute("SELECT * FROM users");
console.log(rs);
Features
- SQLite JavaScript API
- SQLite-backed local-only backend
- SQL over HTTP with
fetch()
Roadmap
- Read replica mode
- Cloudflare D1 API compatibility?