How do I set up a local HTTP server using Python?

I usually go:

python3 -m http.server 8080

That lets me serve files from wherever I am. You can even start it from VSCode’s terminal.

If your file is in ~/projects/d3/index.html, just go to that folder first and then hit http://localhost:8080/index.html. W

orks great with D3 since you avoid CORS issues.