This package has been deprecated

Author message:

This package has been deprecated. If you want to take over the package name, contact the author or npm directly.

bedrock-router

1.0.1 • Public • Published

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.

Route patterns

Bedrock routes use a combination of micromatch and expressjs-style pattern matching to enable maximum flexibility while remaining performant.

Valid routes:

GET /
DELETE /path/to/:foo*
?(PUT|POST) /some/:name

Middleware

This has yet to be completed.

API

new Router(options)

Currently takes no options.

router.addRoute(pattern, callback)

Adds a single route to the router.

As seen in

Bedrock is used in the Comet platorm and in a component of GalacticJS.

Readme

Keywords

Package Sidebar

Install

npm i bedrock-router

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • samvv