bedrock-router

A rule-based HTTP router for NodeJS

This package has been deprecated. If you want to take over the package name, contact the author or npm directly.
Last updated 4 years ago by samvv .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install bedrock-router 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 1.0.1                                ...           latest (4 years ago)

2 Versions

  • 1.0.1 [deprecated]           ...           4 years ago
  • 1.0.0 [deprecated]           ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 1
Dependencies (3)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |