This could be the most concise way to launch a local server to view files from any directory on your box.
These Python one liners are simple and allow you to launch a local server from within any site directory on your machine. By default it serves on port 8000 but you can modify the port by adding the port number at the end of the command.
Note that the command changed in Python 3. Navigate to your site directory and run one of the following commands:
If you use either of the default commands above, you can access your site at
Don’t know what version of Python you have (or if it is installed)? Type
python --version in your terminal and you will have the answer.