1.0.1 • Published 8 years ago

leads-router v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

leads-router

A minimal routing library of leads.js.

var router = leads.Router();

router.get('/', function(req, res, next) {
	res.send('Hello world');
});

router.dispatch('/', 'get'); // or router.get('/');

Description

It has been reduced unnecessary function from leads.js.

If you suffice leads-router, you should use it.

The usage is almost the same as leads.js. However, you can not use part of methods of leads.js.

Installation

$ npm install leads-router # for browserify
$ git clone https://github.com/webkatu/leads-router
<script src="leadsRouter.js"></script>

API

See the leads API.

The following are the available properties and methods in leads-router.

leads

next

Request

Router

Support IE10+

If you support IE10+, you should import WeakMap polyfill before you import leadsRouter.js.

$ npm install weakmap
<script src="weakmap.js"></script>
<script src="leadsRouter.js"></script>

Author

License

MIT