April 27, 2022    Share on: Twitter | Facebook | HackerNews | Reddit

Serve http files with python server

Sometimes there is a need to serve html page instead of just displaying it in the browser: - share content with other (allowing download) - serve http document with javascript when javascript can’t be readed due to CORS limitations.

From directory with the content you want to serve type in terminal:

python -m http.server 9000

Read more here