chore: update documentation

This commit is contained in:
2025-10-05 23:16:57 +03:00
parent 3287c38836
commit fcd27dee97
2 changed files with 73 additions and 3 deletions

View File

@@ -41,16 +41,47 @@ go install
## Quick Start with Server
```bash
# 1. Start KVS server (in ../kvs/)
cd ../kvs && ./kvs config.yaml
# 1. Start KVS server as daemon (in ../kvs/)
cd ../kvs
./kvs start config.yaml
# Check server is running
./kvs status
# View logs to get root token
tail ~/.kvs/logs/kvs_config.yaml.log | grep "Token:"
# 2. Run shell
cd ../kvs-sh
./kvs-shell
# 3. In shell:
# connect http://localhost:8080
# auth $KVS_ROOT_TOKEN
# auth <root-token-from-logs>
# put test/data '{"hello":"world"}'
# 4. Stop server when done
cd ../kvs
./kvs stop config
```
**Daemon Commands:**
```bash
# Start server
./kvs start config.yaml # or just: ./kvs start config
# Check status
./kvs status # Show all instances
./kvs status config # Show specific instance
# View logs
tail -f ~/.kvs/logs/kvs_config.yaml.log
# Stop server
./kvs stop config
# Restart server
./kvs restart config
```
**Important:** If auth fails with "token not found", the database has old data. Either: