This Dev Container environment is a monorepo that is primarily intended for use with GitHub Codespaces. This environment showcases how to use XTDB from a variety of languages and runtimes in a convenient sandbox.
To very simply get started, without any local installation, create your own GitHub Codespace in the cloud and use the browser-based VS Code tooling:
Once the Codespace loads (note: this can take several minutes), you can start running SQL queries against XTDB!
The VSCode 'SQL Tools' extension is pre-configured to connects to the running XTDB Docker container. You can use this extension to explore the database and run queries.
Alternatively open the terminal and run: psql -h xtdb xtdb
You should now be able to execute a query like SELECT 1 + 1
Within the driver-examples
directory you will find a range of subdirectories for various languages, where each contains a minimal example as well as a run.sh
script that you can use to execute the example (the script will also first install the dependencies).
All examples are connected to the same XTDB instance, running as an ephemeral Docker container within the sandbox environment (no data is persisted).
Feel free to hack on the examples - your Codespace is your own to explore!
Debug logs for the XTDB container can be found under logs/xtdb.log
.
For any assistance or questions, please open an issue or post on the forums. PRs are welcome too!
With Docker Compose installed, clone this repo then run:
docker compose build
docker compose up -d
docker exec -it --user codespace app /bin/bash
Note that you will likely still need an internet connection after the containers have started to download dependencies.
When finished, you can shut down the containers using: docker compose down
Run sudo su
- the asdf
command should now be available to install new things. Alternatively, use sudo /root/.asdf/bin/asdf ...