Skip to content

bendrucker/self-link

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

self-link Build Status Greenkeeper badge

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

About

Generate a link to a path on the running web application

Resources

License

Stars

Watchers

Forks

Packages

No packages published