1.1.1 • Published 8 years ago

neuron-reverse-router v1.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

Build Status

neuron-reverse-router

Reverse router to map a local filename to a url path according to router configurations of neuron-dev-server.

Install

$ npm install neuron-reverse-router --save

Usage

routers:

[
  {
    location: '/mod',
    root: '/home/my/.static_modules/'
  },
  
  {
    location: '/old',
    root: ['/data/public']
  },
  
  {
    location: '/new',
    root: ['/data'],
    with_location: true
  }
]
var rr = require('neuron-reverse-router');

rr.route('/data/public/a.js', routers); // '/old/a.js'

License

MIT

1.1.1

8 years ago

1.1.0

8 years ago

1.0.1

8 years ago