1.0.2 • Published 10 years ago

connect-pathconfig v1.0.2

Weekly downloads
2
License
WTFPL
Repository
github
Last release
10 years ago

connect-pathconfig

Node packaged module for connect/express middleware that provides url path-related configurations for requests

install

add to an existing connect/express project: install from command line

$ cd PROJECT-NAME
$ npm install connect-pathconfig --save

test

uses mocha test

$ mocha

use

within a node connect or express project, use as middleware:

var connect = require('connect')
var pathconfig = require('connect-pathconfig');
var app = connect();

var config = {
  '': {bla: 'elk', dog: 'barks'},
  pp1: {
    '': {bla: 'geweih', cat: 'meauws'}
  }
};

app.use(pathconfig(config));

app.use(function (req, res) {
  console.log(req.getPathConfig());
});
1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago