If you need a quick one-liner HTTP server from the command line, Python comes in handy.
How to create an HTTP server in one line
Python enables users to run a simple command to spin up an HTTP server:
|
|
Example:
|
|
By default, this command will serve the files in the current directory using a single-threaded HTTP server bound to localhost.
In addition, users may specify a different directory:
|
|