Run Simple Local Web Server for Testing / Development
Posted on Mar 13, 2018
When you’re testing or developing a simple HTML-based website, you don’t need to go through the hassle of installing and configuring Apache or some other server. Following are two simple options:
If you’re on a Mac, then Python is probably already installed and you can just start up the server from the folder containing your website files using the command: python -m SimpleHTTPServer. If you’re on Windows, you can download Python and then run the command. Detailed instructions can be found on Mozilla’s website.
BrowserSync is another option that has the added benefit that it watches changes to your website files and if it detects a change, it’ll reload the browser for you.