tree-router-middleware
v0.0.1
Published
Tree Route, route HTTP calls fast
Downloads
2
Readme
Tree Route, route HTTP calls fast
Tree Router - Nested Tree Fast and Efficient HTTP Routing at constant O(1) lookup with Nested Trees
With Express
var TreeRouter = require('tree-router');
var express = require('express');
var router = TreeRouter();
var app = express();
app.use(router);
With Router-Middleware
var TreeRouter = require('tree-router');
var rm = require('router-middleware');
var router = TreeRouter();
var app = rm();
app.use(router);
Example
var TreeRouter = require('tree-router');
var router = TreeRouter();
// configure
router.get('/user/detail',fn);
router.get('/user/:id', fn2);
router.post('/user/avatar', fn3);