redman-relative-urls

1.1.1 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i redman-relative-urls

Weekly Downloads

1

Version

1.1.1

License

none

Last publish

Collaborators

  • eckoit