Wajez API is a library built on Express and Mongoose to simplify REST API development by generating CRUD routes from Mongoose models and relations. Current stable version is 1.6.2. It follows a functional programming style using Sanctuary, offering full control over routes and actions. Differentiators include automatic route generation based on model relations (one-to-many, many-to-many), built-in pagination, sorting, and filtering. Release cadence is sporadic; last update was in 2019. Suited for rapid prototyping but not actively maintained.
npm install wajez-apiNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Sets up a REST API for User and Post models with a one-to-many relation, including error handling.
Evaluate alternative frameworks.
Add app.use(bodyParser.json()) before app.use(api(...)).
Ensure model schemas include 'ref' in ObjectId fields used in relations.
Update app to handle larger default limit or set limit explicitly.
Run 'npm install wajez-api' and ensure no typo in require/import statement.
Verify mongoose.connect() is called and model schema is correct.
Add bodyParser.json() middleware before using wajez-api.