Hacker News new | past | comments | ask | show | jobs | submit login

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



Big list of http static server one-liners: https://gist.github.com/willurd/5720255


python -m SimpleHTTPServer 8080


That’s Python 2. In Python 3 it’s

    python -m http.server 8000


On MacOS, it seems that python 2 is still the default so the right command is :

python3 -m http.server 8000


It'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.


Thanks :)

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.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: