1.1.1 • Published 9 years ago

redman-relative-urls v1.1.1

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

redman-relative-urls

A way of rewriting urls relative to where the request was served from. Make apps more portable to different paths, and testing configurations.

npm install redman-relative-urls

Usage

var config = {
  widget_path: 'login'
  proxy_path: '/widget_proxy',
  app_path: '/app'
}
var relative = require('redman-relative-urls')(config)
relative(req, {
   asset_url: '/static'
})

License

MIT