@sebi2020/http_route

0.2.0 • Public • Published

http_route

Build Status A nodejs module for routing of pretty urls.

Use

http_route.addRoute("GET", "/my/url/:param1", callback_function);

The callback function should have the following signature:

function callback_function(req, res, route)

routecontains the parameters For more information look at the Documentation

In your createServer callback, call http_route.route(req,res,pageNotFoundHandler)

The pageNotFoundHandler function should have the following signature:

function pageNotFoundHandler(req, res)

Readme

Keywords

Package Sidebar

Install

npm i @sebi2020/http_route

Weekly Downloads

1

Version

0.2.0

License

GPL-3.0

Unpacked Size

9.74 kB

Total Files

4

Last publish

Collaborators

  • sebi2020