0.1.7 • Published 2 years ago

miptleha-http v0.1.7

Weekly downloads
3
License
MIT
Repository
github
Last release
2 years ago

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.

0.1.7

2 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago