Different Options to set up the local HTTP server

Albin Issac
Tech Learnings
Published in
3 min readJan 8, 2022

--

Most of the time working on a project required testing the files through a local HTTP server quickly, in this post lets us see the different options to quickly enable the HTTP server in the local system.

Python HTTP Server:

Ensure the Python is installed into your system. Python can be downloaded from https://www.python.org/

Now CD to the folder where your local files are placed

Start the server, the default port is 8000, specify a different port if required.

python3 -m http.serveror python3 -m http.server 80

If Python version returned is 2.X

python -m SimpleHTTPServer

The files are now accessible through an HTTP URL

http://localhost:8080/Test.htmlhttp://localhost:8080/Test-Data.txt

Node— HttpServer

The http-server is a simple, zero-configuration command-line static HTTP server.

--

--

Albin Issac
Tech Learnings

I work as a Software Architect specializing in Marketing Technologies. For more information, please visit my profile at: https://myprofile.albinsblog.com/