Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-simplerouter

An awfully simple regex parameter based HTTP router

Usage

var http = require('http');
var simplerouter = require('simplerouter');

var router = simplerouter({
    url: '/hello',
    action: function (req, res) {
        res.writeHead(200, {'Content-Type': 'text/plain'});
        res.end('Hello World\n');
    },
    method: 'GET' // optional
});

http.createServer(router).listen(1337, '127.0.0.1');

Requirements

none

License

MIT (see LICENSE)

About

An awfully simple regex parameter based HTTP router for Node.js apps

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages