1.0.2 • Published 3 years ago

http-server-node v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

http-server-node

Simple, Based on NodeJs, command-line http server

Example of running http-server

http-server-node: on NodeJs based, command-line http server

http-server-node is a http server. It is not for Production usage only for test or learning purpose

Installation:

Globally via npm

npm install --global http-server-node

This will install http-server-node globally so that it may be run from the command line anywhere.

Running on-demand:

Using npx you can run the script without installing it first:

npx http-server-node 
 

As a dependency in your npm package:

npm install http-server-node

Usage:

 http-server-node [entryPoint]

[entryPoint] defaults to index.html

Now you can visit http://localhost:3030 to view your server

Available Options:

CommandDescriptionDefaults
-p or --portPort to use..3030
-o or --openOpen browser window after starting the server.false
-h or --hostHost to use127.0.0.1
-e or --entryPointEntry Point to useindex.html

Magic Files

  • index.html will be served as the default file to any directory requests.