Files
herolib/lib/data/ourdb/CLIENT.md
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

924 B

OurDB Client

Overview

This client is created to interact with an OurDB server.

Prerequisites

Before running the client script, ensure that the OurDB server is up and running. You can start the server by following the instructions in the OurDB Server README.

Installation

Ensure you have the V programming language installed. You can download it from vlang.io.

Running the Client

Once the OurDB server is running, execute the client script:

examples/data/ourdb_client.vsh

Alternatively, you can run it using V:

v -enable-globals run ourdb_client.vsh

How It Works

  1. Connects to the OurDB server on localhost:3000.
  2. Sets a record with the value hello.
  3. Retrieves the record by ID and verifies the stored value.
  4. Deletes the record.

Example Output

Set result: { id: 1, value: 'hello' }
Get result: { id: 1, value: 'hello' }