Middleware for Express that automatically generates RESTful endpoints from Mongoose schemas. Provides CRUD operations (create, read, update, delete) with customizable routes, search, and pagination. Version 4.0.2 supports Express 4.x and Mongoose 4.x/5.x. Released monthly, it differentiates by offering a declarative approach to building REST APIs with minimal boilerplate, including built-in validation and error handling.
npm install mongoose-rest-endpointsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a REST API endpoint for User model with automatic CRUD routes under /api/users.
Ensure app.use(express.json()) precedes endpoint middleware.
Use { paginate: { default: 20 } } instead of { limit: 20 }.Use dynamic import or set type: module in package.json.
Use import or dynamic import: const endpoints = (await import('mongoose-rest-endpoints')).defaultCreate a Mongoose model from the schema before passing to endpoints: const User = mongoose.model('User', schema)Ensure your request includes an ID parameter (e.g., /api/users/123)