Files
herolib/examples/data/ourdb_server.vsh
Mahmoud Emad d2c1be5396 feat: Add basic key-value store example
- Added a client and server for a simple key-value store.
- Improved documentation with client and server usage examples.
- Created client and server implementations using the V language.
2025-03-06 13:32:57 +02:00

18 lines
421 B
GLSL
Executable File

#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
import freeflowuniverse.herolib.data.ourdb
import os
mut server := ourdb.new_server(
port: 3000
allowed_hosts: ['localhost']
allowed_operations: ['set', 'get', 'delete']
secret_key: 'secret'
config: ourdb.OurDBConfig{
path: '/tmp/ourdb'
incremental_mode: true
}
)!
server.run()