@vivid-front/http
v1.5.2
Published
A Node.js library for creating fake APIs from file structure.
Maintainers
Readme
@vivid-front/http
HTTP utilities used by the Fake API runtime and clients.
What it is
- A thin wrapper around Express server utilities used by @vivid-front/fake-api.
- Reads endpoint configuration from the global FAKE_API_HTTP when available (injected by @vivid-front/bundler).
Install
- npm: npm install @vivid-front/http
- yarn: yarn add @vivid-front/http
- pnpm: pnpm add @vivid-front/http
Usage (client-side consumption example)
// When built with @vivid-front/bundler, the global will exist:
const cfg = (globalThis as any).__FAKE_API_HTTP__;
const baseUrl = cfg?.endpoints?.default?.baseUrl || 'http://localhost:3333';Node support
- Node >= 22.18.0
License MIT
