This directory contains scripts for demonstrating HarmonyLite's database replication capabilities using different applications and scenarios.
The run-cluster.sh script demonstrates a basic three-node HarmonyLite cluster with a simple Books database.
./run-cluster.shThis script:
- Sets up a three-node HarmonyLite cluster
- Creates a sample Books database on each node
- Demonstrates basic replication functionality
The run-pocketbase-demo.sh script automates the setup and execution of a distributed note-taking application using HarmonyLite for SQLite replication and PocketBase as the backend.
./run-pocketbase-demo.shThis demo:
- Sets up a two-node HarmonyLite cluster
- Configures two PocketBase instances with:
- Pre-created admin user
- "notes" collection schema
- Demonstrates bidirectional replication between nodes
- Shows fault tolerance capabilities
--help: Display usage information--keep-files: Don't delete temporary files on exit--pb-path PATH: Specify an existing PocketBase binary--no-download: Don't download PocketBase if not found
When the demo is running, you can access:
- PocketBase Node 1: http://localhost:8090/_/
- PocketBase Node 2: http://localhost:8091/_/
Login with:
- Email:
admin@example.com - Password:
1234567890
You can modify the configuration files (e.g., node-X-config.toml) to explore different HarmonyLite settings or database schemas.
If you encounter issues:
- Ensure required ports are available
- Check that the HarmonyLite binary is in your PATH or in the current directory
- Examine error messages in the terminal output
- See the troubleshooting guide for more help