1.0.1 • Published 8 years ago

self-link v1.0.1

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

self-link Build Status

Generate a link to a path on the running web application

Install

$ npm install --save self-link

Usage

var selfLink = require('self-link')

selfLink('/foo')
//=> https://www.my-current-host.domain/foo

API

selfLink(path) -> string

path

Required
Type: string

The path for the generated link. The path will be appending to the current protocol + host. In Node, the path will be /-prefixed and then returned.

License

MIT © Ben Drucker