We can run the project using go run
or creating an executable binary using go build
. The only mandatory argument that you need to pass is DB
, that can be a file path to a libsql/SQLite database or the URL to a Turso database.
To start a shell for libSQL/SQLite databases just point to your database location
go run ./cmd/libsql-shell/main.go my_libsql.db
To start a shell for Turso databases, you need your database URL and a database token:
- Login on Turso:
turso auth login
- Create a database:
turso db create
- Get your database URL:
turso db show <db_name>
. The URL will be on the formatlibsql://<db_name>-<username>.turso.io
- Create a database token:
turso db tokens create <db_name>
Then, to connect to Turso database you need to pass the database token as query parameter of URL, like the following command:
go run ./cmd/libsql-shell/main.go libsql://<db_name>-<username>.turso.io/?jwt=<db_token>`
Git Hooks are shell scripts that run automatically before or after Git executes an important command, such as Commit or Push. To install it, run the command:
./scripts/git/install-git-hooks.sh
The tests are configured through .test_config.yaml
file. Copy .test_config.yaml.example
to create your .test_config.yaml
and see below the description for each field:
turso_db_path
: URL for turso database used during the tests. It should be a dedicated database once it's cleared after each test. Follow steps from Running the Project/Turso to generate a Turso db path. For this database, it's useful to generate a non-expiration token withturso db tokens create --expiration none <turso_test_db_name>
skip_turso_tests
: Used to skip Turso related tests