Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 437 Bytes

README.md

File metadata and controls

26 lines (20 loc) · 437 Bytes

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