Start a Simple HTTP Server in Any Folder
Posted on 05 Ekim 2015 in Programlama by admin
If you’re needing to quickly test some HTML that you’re working on, start a simple web server within any folder on your Mac. Navigate to the folder to use and enter:
1
|
$ python -m SimpleHTTPServer 8000 |
The number at the end is the port to use, open your browser and visit http://localhost:8000 You can use the default of port 80 if you wish and remove the port number entirely.
When you’re finished, simply press Ctrl-C.