server
- Start an HTTP server and open the specified file (or current directory) with the default browser, optionally specifying the port
server
[-p port
] [-f file
]
Start an HTTP server and open the specified file (or current directory) with the default browser, optionally specifying the port. If a port is not specified, then set the default to port 8000.
-p
Port number.
-f
File to open with the server.
--help
Display this help and exit.
Serve a file named foobar.html
:
server -f foobar.html
You can optionally change the port
:
server -p 9000 -f foobar.html
Serve the current directory using port 9999
:
server -p 9999
Written by Larry Gordon
The MIT License (MIT) <http://psyrendust.mit-license.org/2014/license.html>