New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

dev-service-host

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dev-service-host

Development wrapper around service-host

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

dev-service-host

Build Status

A development-oriented wrapper around service-host.

Provides:

  • A dashboard - accessible by pointing your browser at the host
  • Services for controlling/introspecting a running host:
    • __clear_cache - Host cache clearing
    • __hot_load - Hot-loading of services
    • __shutdown - Start the shut down of a running host. If you want a guarantee that the host has completed the shutdown, call bin/stop.js
    • __status - Host status (config, services available, etc)
  • Host start/stop scripts, with support for controlling a host running in a detached process

Installation

npm install dev-service-host

CLI usage

# Start a dev host in a detached process
node bin/start.js  # exits once the host is listening

# Start a dev host in a blocking process
node bin/start.js --blocking  # exits once the host has stopped

# Stop a running dev host
node bin/stop.js  # exits once the host has stopped

All commands accept an optional --config option which allows you to configure/target a host.

If your host is running at an address/port other than the defaults, make sure that you pass that config into bin/stop.js so that it knows where to find the host.

Programmatic usage

var DevHost = require('dev-service-host');

var host = new DevHost();

host.listen();

// see service-host for more usage examples

Configuring the host

In addition to the normal config, dev hosts support

{
  // An optional number indicating that the host should shut
  // down after a period of inactivity. Inactivity is measured
  // as the time since the last request. The value should be
  // measured in milliseconds. This option is only activated
  // if the host starts listening.
  inactivityShutdownDelay: null
}

FAQs

Package last updated on 29 Mar 2015

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