Starting a python web server

date
Jul 7, 2024
outer_link
slug
python-web-server
status
Published
tags
Python
summary
type
Snippet

❓How to

  1. Go to the directory that you want the server to start
  1. Run the command below
  1. Open http://localhost:8000/

Python 3

python -m http.server 8000

Python 2

python -m SimpleHTTPServer 8000

Mohamed Irfan © 2025