A small Redis-like in-memory store exposed through a REST API, written in Rust.
cargo runBy default, the server listens on 127.0.0.1:7379.
$env:NYSSRAD_ADDR = "0.0.0.0:7379"
cargo runcurl -X PUT http://127.0.0.1:7379/v1/kv/name \
-H "content-type: application/json" \
-d '{"value":"Ada","ttl_seconds":60}'
curl http://127.0.0.1:7379/v1/kv/name
curl -X POST http://127.0.0.1:7379/v1/kv/name/incr -H "content-type: application/json" -d '{"by":2}'
curl -X DELETE http://127.0.0.1:7379/v1/kv/nameCommon operations are also available through POST /v1/commands:
curl -X POST http://127.0.0.1:7379/v1/commands \
-H "content-type: application/json" \
-d '{"command":"set","args":["visits","1"],"ttl_seconds":30}'
curl -X POST http://127.0.0.1:7379/v1/commands \
-H "content-type: application/json" \
-d '{"command":"incr","args":["visits"]}'Supported commands:
- Strings:
GET,SET,DEL,EXISTS,EXPIRE,TTL,INCR,DECR,MGET,MSET - Lists:
LPUSH,RPUSH,LPOP,RPOP,LRANGE - Hashes:
HSET,HGET,HGETALL,HDEL - Sets:
SADD,SREM,SMEMBERS,SISMEMBER - Admin:
DBSIZE,FLUSHDB
- Data is intentionally kept in memory only.
- TTL cleanup is lazy and happens when keys are accessed.
- Values are JSON-compatible; the command endpoint treats arguments as strings.