A rule-based HTTP router for NodeJS.
Express is great, but it is limited when one wants to use it for advanced use cases, such as statistics gathering. Bedrock router solves these issues.
const WebApp = require('bedrock-routes').WebApp
Constructs a new router. A router is an extension of Node's
In addition to the usual Node HTTP events, these events are emitted:
- processingError: when the route produced an error message
- notFound: when no rule was found for the specified request
Listens on the specified port, or a random available port if no port is specified. Returns an empty promise.
Adds a route to the application. Callback has the form
(req, res) => any, where
any can be a promise which possibly gets rejected.
Manabi is named after a reqion in Ecuador which produces coffee beans.