Socket
Book a DemoInstallSign in
Socket

server-url

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

server-url

Retrieve the url a server is listening on

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

server-url

NPM version build status Test coverage Downloads

Retrieve the url a server is listening on.

Installation

npm install server-url

Usage

var serverUrl = require('server-url')
var http = require('http')

var server = http.createServer()
var url = serverUrl(http.listen())
// => `http://0.0.0.0.0:1337`

Why?

Retrieving a server url is a bit verbose. This makes it easier.

See Also

License

MIT

Keywords

server

FAQs

Package last updated on 04 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts