Setup
Preparing your environment for bknd
In order to use bknd, you need to prepare access information to your database and install the dependencies.
Connections to the database are managed using Kysely. Therefore, all its dialects are
theoretically supported. However, only the SQLite
dialect is implemented as of now.
Database
SQLite as file
The easiest to get started is using SQLite as a file. When serving the API in the “Integrations”, the function accepts an object with connection details. To use a file, use the following:
Please note that using SQLite as a file is only supported in server environments.
SQLite using LibSQL
Turso offers a SQLite-fork called LibSQL that runs a server around your SQLite database. To point bknd to a local instance of LibSQL, install Turso’s CLI and run the following command:
The command will yield a URL. Use it in the connection object:
SQLite using LibSQL on Turso
If you want to use LibSQL on Turso, sign up for a free account, create a database and point your connection object to your new database:
Installation
To install bknd, run the following command: