CachePuppy
JavaScriptAdmin HTTP

Admin HTTP client

createAdminClient for /api/server/v1 topic routes and /api/cache/* without websockets.

CachePuppyAdminClient is exported from @cachepuppy/core for backends, cron jobs, and services that should not hold a long-lived websocket just to mutate topic state or cache keys.

import { createAdminClient } from "@cachepuppy/core";

const admin = createAdminClient({
  url: "ws://localhost:4000/socket/websocket",
  authToken: process.env.CACHEPUPPY_TOKEN,
});

The url field uses the same convention as createClient — a Phoenix websocket URL whose HTTP origin is derived internally.