If you want to quickly test a website under development or serve a couple of webpages from a local directory without the hassle of moving/linking the directory to a web server root, the following python command helps:
Run the following command from the intended directory substituting [port] with
the required value. It defaults to 8000 if nothing is specified.
For Python2,
1
| |
For Python3,
1
| |