0.0.9 • Published 10 years ago

femto-router v0.0.9

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

Femto Router

Router middleware for Femto.

Installation

$ npm install femto-router

Running Tests

Install dev dependencies.

$ npm install

Check code quality.

$ npm run lint

Example

'use strict';

var femto = require('femto'),
  router = require('femto-router');

var app = femto();

// all get requests where the request url starts with : "/api"
app.use(router.get('/api', function (next) {
  this.body = { message: 'Hello World' };
  next();
}));

app.listen(process.env.PORT || 3000);

License

MIT

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.1

10 years ago