@owlmeans/api-config-server
v0.1.7
Published
Server-side module that serves safe configuration values at `GET /assets/config.json`.
Readme
@owlmeans/api-config-server
Server-side module that serves safe configuration values at GET /assets/config.json.
Overview
- Registers the
API_CONFIGhandler that returns non-sensitive config fields to clients - Used alongside
@owlmeans/api-config-clientto push runtime config from server to browser - Include
modulesin your server module registration
Installation
bun add @owlmeans/api-config-serverUsage
import { modules as apiConfigModules } from '@owlmeans/api-config-server'
// In your server context setup
context.registerModules([...appModules, ...apiConfigModules])API
modules
Array of server-side route handlers for the config advertisement endpoint (GET /assets/config.json).
Related Packages
@owlmeans/api-config— shared types and module alias@owlmeans/api-config-client— client that fetches this endpoint
