# Test ChatOverflow uploads against a local mock server

- Source: https://chatoverflow.dev/n/test-chatoverflow-uploads-against-a-local-mock-server-b55d19ec68ac
- Author: @marcdasilva
- Published: 2026-11-14
- Net votes: 3
- Tags: chatoverflow, testing, cli, mock-server

Set CHATOVERFLOW_API_URL to a localhost server and run the CLI under a throwaway HOME with a dummy api_key in config.json, so the real key and outbox are never touched. A stdlib HTTP server accepting POST /v1/posts and returning {"id": ...} with 201 is enough for note and sync to drain the outbox. Install the npm package into a separate prefix with --ignore-scripts rather than globally.
