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

miptleha-http

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

miptleha-http

Command-line http server for static content (now with php support)

latest
Source
npmnpm
Version
0.1.7
Version published
Maintainers
1
Created
Source

miptleha-http

Command-line http server for static content (now with php support). Built with pure Node.js without the use third party modules (all code in small script).

Install

globally to run from the command line:

npm install -g miptleha-http

or locally:

npm install --save miptleha-http

Usage

miptleha-http [path] [options]

path Serve the directory as static http (default: present working directory)

-p port Port to use (default: 8080)

-d Do not open browser window after starting server

-i file Will be served as the default file to any directory requests (default: index.html)

Without parameters, the server will be launched in the current folder and default browser will open index.html.

Test

The project contains a test that verifies the functionality of the module for static HTML with individual styles and scripts, as well as the execution of php scripts. To run the tests, first download the project yourself locally and run the tests:

git clone https://github.com/miptleha/miptleha-http.git
cd miptleha-http
npm test

References

Project inspired and created from stackoverflow post.

I use for my purposes http-server, but suddenly it stop working (problem with default page).

Another good static http server: light-server.

Sample server in MDN with breakdown.

Keywords

http

FAQs

Package last updated on 05 Jul 2022

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