Run and First Requests
Run locally
Section titled “Run locally”cargo run -p redis-web --bin redis-web -- redis-web.jsonIf no config path is passed, redis-web loads redis-web.json by default, then
falls back to webdis.json for compatibility.
Write a default config
Section titled “Write a default config”redis-web --write-default-configThis writes redis-web.json with $schema set to ./redis-web.schema.json.
First HTTP requests
Section titled “First HTTP requests”curl http://127.0.0.1:7379/SET/hello/worldcurl http://127.0.0.1:7379/GET/helloEach path segment becomes a Redis argument. If you see 400, double-check your
command spelling and URL encoding.
JSON WebSocket
Section titled “JSON WebSocket”const ws = new WebSocket('ws://127.0.0.1:7379/.json');ws.onopen = () => ws.send(JSON.stringify(['SET', 'hello', 'world']));ws.onmessage = (msg) => console.log(msg.data);The JSON socket replies with JSON-encoded Redis responses and supports multiple commands on a single connection.
Raw RESP WebSocket
Section titled “Raw RESP WebSocket”const ws = new WebSocket('ws://127.0.0.1:7379/.raw');ws.onopen = () => ws.send('*1\r\n$4\r\nPING\r\n');Use the raw socket when you need RESP fidelity or binary-safe payloads.