Rest Query is a REST API framework for Node.js (version 0.79.8) focused on querying and manipulating documents via RESTful endpoints. It features hooks for document lifecycle events (beforeCreate, afterCreate, etc.), app lifecycle hooks (init, shutdown), and a powerful query system. Currently in early alpha, it requires Node.js >=22.16.0. Key differentiators include its hook mechanism that allows modifying or interrupting flow, and its focus on document-oriented operations. The framework is actively maintained with noticeable development activity.
npm install rest-queryNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create a Rest Query app with MongoDB, define a collection, and add a hook for document creation.
Ensure all hook functions are async or return a Promise.
Use array syntax for multiple hooks: hooks: { beforeCreate: [hook1, hook2] }No action needed; naming remains the same.
Update Node.js to >=22.16.0.
Migrate your project to ESM (add 'type': 'module' to package.json) or use dynamic import().
Use named import: import { createApp } from 'rest-query'Update Node.js to version 22.16.0 or later.