@ops-ai/nuxt-toggly-server
v1.7.0
Published
Server-side feature flag utilities for Nuxt with Nitro support
Readme
@ops-ai/nuxt-toggly-server
Server-side feature flag utilities for Nuxt with Nitro support
Install
npm install @ops-ai/nuxt-toggly-serverFor usage/metrics gRPC transport on Node/Nitro (optional):
npm install @grpc/grpc-js @grpc/proto-loaderTelemetry
When appKey is set, feature usage and business metrics are enabled by default
(disable with enableUsageTracking: false / enableMetrics: false, or
TOGGLY_DISABLE_TELEMETRY=1). Checks via isServerFeatureOn / the shared
client record usage; call recordServerUsage / measureServerMetric /
flushServerTelemetry as needed.
- Node / Nitro node-server: native gRPC to
metricsBaseUrl(defaulthttps://app.toggly.io/). - Nitro edge / Workers-like: set
telemetryTransport: 'https'(auto whenisEdgeRuntime()), which POSTs gateway JSON toapi/usage/statsandapi/metrics. Process signal handlers are disabled on the HTTPS path.
Browser @ops-ai/nuxt-toggly-client is out of scope for this pipeline.
Live updates
By default, initServerToggly enables WebSocket live updates (enableLiveUpdates:
true) and injects the ws package as webSocketImpl, while keeping
refreshInterval: 0 (no HTTP polling). Pass enableLiveUpdates: false to
disable. Edge/short-lived runtimes skip sockets in core.
Documentation
- docs.toggly.io
- SDK catalog: root README
License
MIT — see also the repository LICENSE.
Issues
Use the structured issue templates.
