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

http-stahp

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

http-stahp

Simple web server that can be gracefully stopped.

latest
Source
npmnpm
Version
0.0.1
Version published
Weekly downloads
3
50%
Maintainers
1
Weekly downloads
 
Created
Source

http-stahp

This is a very simple http module wrapper that adds in a following nice extras (believe it or not, there is nothing on NPM that meets meets this criteria):

  • Ability to choose host, port and folder to serve static content out of.
  • Basic socket tracking.
  • The ability to shut down the server, even in cases where the http.close() method doesn't work (and in some cases, it simply doesn't).

Example Setup

Pretty straightforward. The main additional function is the stop method.

var httpStahp = require('http-stahp');
httpStahp.start({host:'localhost',port:'8080',root:'/tmp'}, function (eError) { 
    if (eError) throw eError;
    ...
});
...
httpStahp.stop(function (eError) { 
    if (eError) throw eError;
});

Keywords

http

FAQs

Package last updated on 31 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