http-server-auth
is a simple, zero-configuration command-line http server with auth.
Installation via npm
:
npm install http-server-auth -g
This will install http-server-auth
globally so that it may be run from the command line.
http-server-auth [options]
N.B : If you use special chars and passing it using arguments, you must mind to escape them.
http-server-auth --username admin --password password -P 1234
mkdir myapp
cd myapp/
npm install http-server-auth
node lib/http-server-auth
-p
Port to use (defaults to 3000)
--username
Username for basic authentication (defaults to 'admin')
--password
Password for basic authentication (defaults to 'password')
--path
Path to static page (defaults '/')
-h
or --help
Print this list and exit.