http-server
is a simple, zero-configuration command-line http server. It is powerful enough for production usage, but it's simple and hackable enough to be used for testing, local development, and learning.
Installation via npm
:
npm install server-lxy -g
This will install http-server
globally so that it may be run from the command line.
server-lxy [path] [options]
[path]
defaults to ./public
if the folder exists, and ./
otherwise.
Now you can visit http://localhost:8080 to view your server
Note: Caching is on by default. Add -c-1
as an option to disable caching.
-p
or --port
Port to use (defaults to 8080)
-0
Address to use (defaults to localhost)
-d
Show directory listings (defaults to true
)