GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - SDK-E/redisk: Local development Upstash-REST-compatible Redis emulator — in-memory, zero deps, @upstash/redis compatible

BranchesTags
Open more actions menu

Latest commit

 

History

3 Commits
3 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
src
src
 
 
test
test
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
.prettierrc.json
.prettierrc.json
 
 
AGENTS.md
AGENTS.md
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
FUNDING.yml
FUNDING.yml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
eslint.config.js
eslint.config.js
 
 
package.json
package.json
 
 
pnpm-lock.yaml
pnpm-lock.yaml
 
 
pnpm-workspace.yaml
pnpm-workspace.yaml
 
 
tsconfig.build.json
tsconfig.build.json
 
 
tsconfig.json
tsconfig.json
 
 
vitest.config.ts
vitest.config.ts
 
 

Repository files navigation

redisk

CI npm license

A local development Upstash-REST-compatible Redis emulator. In-memory, zero runtime dependencies, wire-compatible with the Upstash REST API — the real @upstash/redis client works against it unmodified.

Run one shared instance for your whole machine so multiple projects never fight over ports or data.

Install

pnpm add -D @sdk-e/redisk   # or npm i -D / yarn add -D

Or run ad hoc:

npx @sdk-e/redisk

Quick start

redisk
# redisk: Upstash-compatible API on http://127.0.0.1:18000 (token: upstash)

Point any Upstash REST client at it:

Variable Value
KV_REST_API_URL http://127.0.0.1:18000
KV_REST_API_TOKEN upstash
import { Redis } from "@upstash/redis";

const redis = new Redis({ url: "http://127.0.0.1:18000", token: "upstash" });
await redis.set("hello", "world");

Library use

Omit the port for an OS-assigned ephemeral instance — perfect for integration tests:

import { startRedisk } from "@sdk-e/redisk";

const server = await startRedisk(); // random free port
// pass server.url + a token of your choosing to your app under test
await server.close();

Wire protocol

  • Bearer-token auth (Authorization: Bearer <token>); failures return 401 {"error":"Unauthorized"}.
  • POST / with a single JSON command array → one { result | error }.
  • POST /pipeline with an array of command arrays → array of { result | error }.
  • Path-encoded commands: GET /set/foo/bar ≡ POST / ["set","foo","bar"].
  • Honors the upstash-encoding: base64 header on responses.
  • Malformed bodies return HTTP 200 with { error } — matching Upstash behavior.
  • Unknown routes return 404 {"error":"Not found"}.

Supported commands

PING · ECHO · FLUSHALL · FLUSHDB · GET · SET (EX, PX, NX, XX) · DEL · UNLINK · EXISTS · EXPIRE · PERSIST · TTL · PTTL · INCR · DECR · INCRBY · DECRBY · KEYS

That covers typical web-app usage (caching, counters, rate limiting). Need more? Open an issue — additions must stay protocol-faithful.

Configuration

Variable Default Purpose
REDISK_PORT 18000 Listen port (fallback: REDIS_LOCAL_PORT)
REDISK_TOKEN upstash Bearer token (fallback: REDIS_LOCAL_TOKEN)
REDISK_HOST 127.0.0.1 Bind interface

CLI flags override env: --port, --token, --host.

Data lives in memory only and disappears when the process exits — by design.

Why port 18000?

Classic local defaults like 6379 collide with real Redis installs; 8000 collides with common dev servers. 18000 keeps a dedicated emulator lane clear even when several SDK-E projects run at once against the shared instance.

Development

Requires Node >= 20 and pnpm >= 11.

pnpm install
pnpm verify     # format, lint, typecheck, test, build

The test suite runs the official @upstash/redis client against the emulator as an integration guarantee.

See CONTRIBUTING.md.

License

MIT

About

Local development Upstash-REST-compatible Redis emulator — in-memory, zero deps, @upstash/redis compatible

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.