Express.js REST controller for stein-orm, providing automatic CRUD routing with authorization hooks, query timing, and database abstraction. Current version 11.7.3. Part of the frameworkstein ecosystem, it requires stein-orm >=8 as a peer dependency. Released via npm, with a stable API focused on Express integration. Differentiators include a built-in timing system for monitoring slow queries and flexible custom authorization middleware per route.
npm install stein-orm-restNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates an Express REST controller for the Task model with timing enabled and a slow-query warning callback.
Replace 'path' with 'route' in the options object.
Wrap your auth function in an array: auth: [customAuth]
Ensure your model implements fetchJSON or use standard query methods instead.
Use const RestController = require('stein-orm-rest').default or import syntax.Use `const RestController = require('stein-orm-rest').default`Run `npm install stein-orm@>=8`
Set `enableTiming: true` in the options
Provide `route` (string) in the options object