I use this from time to time, and searching returns more than one option, I like this one:

python3 -m http.server --bind 127.0.0.1 9000

bind is optional, without it is default 0.0.0.0, port 8000

PythonOneLineWebserver (last edited 2023-12-28 01:54:35 by narrator)