1.0.1 • Published 8 years ago

uriify v1.0.1

Weekly downloads
13
License
-
Repository
github
Last release
8 years ago

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