{"library":"rest-handler","type":"library","category":null,"description":"A Node.js module for creating REST-style request handlers with built-in middleware support, route matching with simple path placeholders, and an event system. Version 1.2.17 uses a path-based router and encapsulates req, res, and next into a single 'rest' object, simplifying request handling compared to Express. Routes are matched before any middleware or handlers run, and unmatched routes can be handled via a 'routeNotFound' event. The package is stable but has low release cadence; it is suitable for simple REST APIs where full Express features are not needed.","language":"javascript","status":"active","version":"1.2.17","tags":["javascript","request","response","request handler","router","middleware"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install rest-handler","imports":["const restHandler = require('rest-handler').create()","const handler = require('rest-handler').create()","handler.addRoute({ path: '/orders/:id', method: 'GET', handler: fn })","handler.before(function(rest) { rest.next() })","handler.on('routeNotFound', function(req, res) { ... })"]},{"cmd":"yarn add rest-handler","imports":[]},{"cmd":"pnpm add rest-handler","imports":[]}],"homepage":"https://github.com/philidem/node-rest-handler","github":"https://github.com/philidem/node-rest-handler","docs":null,"changelog":null,"pypi":null,"npm":"rest-handler","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}