Installation¶
This guide covers installing the ORMDB server and client libraries.
Server Installation¶
Using Docker (Recommended)¶
The easiest way to run ORMDB is with Docker:
# Pull and run ORMDB
docker run -d \
--name ormdb \
-p 9000:9000 \
-p 8080:8080 \
-v ormdb-data:/data \
ormdb/ormdb:latest
# Check it's running
docker logs ormdb
Port 9000 is the native protocol port (used by Rust client). Port 8080 is the HTTP gateway (used by TypeScript/Python clients).
Using Cargo¶
If you have Rust installed, you can build from source:
# Install from crates.io
cargo install ormdb-server
# Or build from source
git clone https://github.com/Skelf-Research/ormdb.git
cd ormdb
cargo build --release
# Run the server
./target/release/ormdb-server --data-dir ./data
Configuration¶
Create a config file at ~/.ormdb/config.toml:
[server]
data_dir = "/var/lib/ormdb"
native_port = 9000
http_port = 8080
[storage]
cache_size = "1GB"
flush_interval = "1s"
compression = true
[security]
enable_auth = false # Enable for production
See Configuration Reference for all options.
Client Installation¶
Rust¶
Add to your Cargo.toml:
[dependencies]
ormdb-client = "0.1"
ormdb-proto = "0.1"
tokio = { version = "1", features = ["full"] }
TypeScript / JavaScript¶
Using npm:
Using yarn:
Using pnpm:
Python¶
Using pip:
With SQLAlchemy support:
With Django support:
Verify Installation¶
Check Server¶
# Using curl
curl http://localhost:8080/health
# Expected response:
# {"status": "healthy", "version": "0.1.0"}
Check Client Connection¶
Next Steps¶
Now that you have ORMDB installed, proceed to the Quickstart to build your first app.