Serving files in current directory using Python http module
When developing backend in Python sometimes we need to easily share files on our development server. Let say we want your collegue to download some file.
Here is a standard python module http we can use for this purpose. To share files in current directory simply run this command
python3 -m http.server
Here I will show listing of my Django project. Output:
Serving HTTP on 0.0.0.0 port 8000 ...
Open browser on 0.0.0.0:8000
That’s it. Very simple.