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

local-static-server

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

local-static-server

Local nodeJS web server for static files

latest
Source
npmnpm
Version
2.2.0
Version published
Weekly downloads
9
200%
Maintainers
1
Weekly downloads
 
Created
Source

local-static-server

Simple local http server for static file in nodeJs.

This package purpose IS NOT to be use in production.
This package aims at being used in a DEVELOPMENT environment.

Install

$ npm install local-static-server -g

Usage

Usage:  local-server [directory] [port] [OPTIONS]

Inputs:
        directory        The directory to serve from. (Optional)
        port             The port to start the server on. (Optional)

Options:
        -s, --silent     Keep logs at minimal
        -v, --version    Display version number
        -h, --help       Show this message

Examples:
        local-server public/src 9000
        local-server ../client
        local-server / 4000
        local-server

Author:         gbarthos <gbarthos.info@gmail.com>
License:        MIT
Version:        local-static-server@2.0.0

Example output:

$ local-server / 9000 
[2017-09-05T20:56:32.042Z][Server] server started at http://127.0.0.1:9000/ on IPv4
[2017-09-05T20:56:32.044Z][Server] ... running on pid [89776]
[2017-09-05T20:56:32.044Z][Server] ... serving folder "/Users/gbarthos/Documents/web/"
GET / 200 - - 12.527 ms
^C (SIGINT)
[2017-09-05T20:56:33.357Z][Server] ... graceful shutdown signaled
[2017-09-05T20:56:33.357Z][Server] server closed

When the given port number is already in use on local IPV4 address, server walks other ports by incrementing the number until a free port is found.

That's all folks!

Keywords

server

FAQs

Package last updated on 12 Sep 2017

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