express-map
package which does a totally different thing )
express-map2 ( not to be confused with Yahoo's adds map() function to express.
install
npm install --save express-map2
usage
setup
var app = ; // 1. include express app;// 2. set path to your controllers. app; // 3. patch map into express
types of usage supported
// without prefixapp; // with prefixapp; //with single middleware passedconst AuthenticateUser2 = {}app; //without prefix and with middlewareapp; app;
testing
testing is done with mocha. to run tests:
- clone the repo
git clone https://github.com/r3wt/express-map.git
- change into project directory install dependencies
npm install
- make sure to have mocha installed globally
npm install --global mocha
. - run tests with
npm test