finds.dev← search

// the find

baugarten/node-restful

★ 1,299 · JavaScript · updated Jul 2022

A library for quickly providing a REST API with express or connect

node-restful auto-generates CRUD routes for Mongoose models on top of Express. You define a schema, call `.methods()` and `.register()`, and the five standard REST routes appear. Aimed at anyone who wants to skip the boilerplate of wiring up Express routes to Mongoose by hand.

The before/after hook system is genuinely useful — you can slot in middleware per-HTTP-method without touching the generated handlers. Built-in query filters (gt, lt, regex, populate, sort, skip, limit) handle most list-endpoint needs without custom code. The model object remains a real Mongoose model, so you're not locked into the abstraction for anything complex. Test coverage across hooks, filters, and chaining is solid for a project this size.

Dead project — last push in 2022, last meaningful activity probably years before that. Express 4 / Mongoose 5 era assumptions are baked in; running this against current Mongoose 8 or Express 5 will likely surface breaking changes. No authentication or authorization hooks — every generated route is wide open by default, which is a footgun for anyone who doesn't immediately wrap it. The detail-route definition syntax (passing an object with `detail: true`) is awkward compared to the clean chainable API everywhere else, and the author admits it in the README.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →