When to Use FeathersJS Service Hooks vs Middleware or Custom Methods
A compact decision guide for FeathersJS: when service hooks beat Express middleware or overriding methods, with trade‑offs and a concrete before‑create validation hook example.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
A compact decision guide for FeathersJS: when service hooks beat Express middleware or overriding methods, with trade‑offs and a concrete before‑create validation hook example.
Use FeathersJS before hooks to separate external transport requests from trusted internal service calls, with checks for hook ordering and failure modes.
Use one AJV JSON Schema in a FeathersJS before hook to validate REST and Socket.io payloads before they reach the database adapter.
Feathers services return either a paginated object or a plain array from find(). Learn how to configure pagination, normalize $limit and $skip in a before hook, and handle offset pagination limits.
Architecture note on using FeathersJS service hooks to enforce authentication, authorization, validation, and pagination across REST and WebSocket transports with explicit trust and data boundaries.
Avoid transport duplication by using FeathersJS service hooks as a unified enforcement boundary for validation and authorization across REST and real-time clients.