5 ms·
I used it as a quick html server as an alternative to the Python “simple” ones, which always had some issues for me. Useful when coding small demos: php -S
by agys 5y ago
I used it as a quick html server as an alternative to the Python “simple” ones, which always had some issues for me.
Useful when coding small demos:
php -S localhost:8000
- iriche 5y agopython -m SimpleHTTPServer 8080
- nindalf 5y agoThat’s Python 2. In Python 3 it’s python -m http.server 8000
- speedgoose 5y agoOn MacOS, it seems that python 2 is still the default so the right command is : python3 -m http.server 8000
- astrange 5y agoIt's strange that this comment chain is trying to teach agys about how to use SimpleHTTPServer when their comment says they tried it and it didn't work for them.
- agys 5y agoThanks :) Both Python (v2 and v3) servers work more or less but they have an issue: the first page load takes about 30 seconds on my machine, usually. I never figured out why exactly and that’s why I started using the PHP server.
- deleted 5y ago[deleted]
- lukifer 5y agoBig list of http static server one-liners: https://gist.github.com/willurd/5720255 https://gist.github.com/willurd/5720255