788 B
788 B
blax-npm-networking
Overview
Plug-and-play API + WebSocket client for Vue/Nuxt apps. Framework-agnostic core with optional bindings.
Build
pnpm build— builds via tsup todist/- Exports:
.(core),./vue,./nuxt,./axios
WebSocket
createWsClient()takes a URL and connects via native WebSocketcreateFromNuxtConfig()readsruntimeConfig.publickeys:WEBS_URL,WS_PROTOCOL,PUSHER_APP_KEY- App key default:
websocket— generic identifier, same in all environments - URL format:
{protocol}://{host}/app/{appKey} - Has built-in connection diagnostics: URL validation, 5s timeout for
connection_established
Conventions
- TypeScript strict mode
- No environment-specific defaults — all config values should work across dev and prod