@feathersjs/client package provides a complete Feathers client build that consolidates all client-side modules into a single package. It includes support for REST and WebSocket connections, authentication, and error handling.
Installation
Browser Usage
You can also use the pre-built browser bundle:Basic Usage
REST Client with Fetch
Socket.io Client
Exported Modules
The client package re-exports all necessary modules:Core
Authentication
object
REST Client
string
The base URL of the Feathers API server
RestClient
REST client instance with transport methods (fetch, axios, etc.)
Socket.io Client
Socket
Socket.io client instance
Error Handling
BadRequest(400)NotAuthenticated(401)PaymentError(402)Forbidden(403)NotFound(404)MethodNotAllowed(405)NotAcceptable(406)Timeout(408)Conflict(409)Unprocessable(422)TooManyRequests(429)GeneralError(500)NotImplemented(501)Unavailable(503)
Complete Examples
Browser Client with Authentication
Node.js Client
Real-time Events
TypeScript Support
The client package includes full TypeScript support:Browser Bundles
The package provides several pre-built browser bundles:dist/feathers.js- Full client with all featuresdist/feathers.min.js- Minified full clientdist/core.js- Core only (no transport or auth)dist/core.min.js- Minified core