self-link

1.0.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i self-link

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • bendrucker