Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bedrock-routes

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bedrock-routes

A rule-based HTTP router for NodeJS

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-25%
Maintainers
1
Weekly downloads
 
Created
Source

Bedrock Router

A rule-based HTTP router for NodeJS.

Motivation

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.

API

const WebApp = require('bedrock-routes').WebApp

new WebApp()

Constructs a new router. A router is an extension of Node's http.Server.

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

app.listen(port?)

Listens on the specified port, or a random available port if no port is specified. Returns an empty promise.

app.addRoute(route, callback)

Adds a route to the application. Callback has the form (req, res) => any, where any can be a promise which possibly gets rejected.

Trivia

Manabi is named after a reqion in Ecuador which produces coffee beans.

Keywords

FAQs

Package last updated on 13 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc