uriify
v1.0.1
Published
A regular expression parser that creates URI strings out of request params in Express
Downloads
1
Readme
URI-ify
Convert http://somesite.com/param/1/test/2 into URIs on the request object
Install
npm install uriify --save-dev
Usage
var express = require('express');
var uriify = require('uriify');
var app = express();
app.use(uriify());
//So on http://somesite.com/person/1
//The request object would have a person object attached
//So rather than writing something like var personUri = '/person/' + req.params.personId
//You'd just write req.person, which would return '/person/1';
Test
npm test