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

Please note that `python -m SimpleHTTPServer 8000` only works with python2.*.



Python 3 equivalent is:

`python -m http.server 8000`

In case anyone was interested.


List of server one-liners: https://gist.github.com/willurd/5720255


Oops, fixed thank you!


Thank you.


Why not simply use file:///home/username/websitename/index.html ?


i guess it wouldn't matter in this particular example, but some browsers apply different security restrictions to the file:// protocol than they do to http.


Hmm I guess I haven't done that in a really long time, but I remember years ago running into issues because local files wouldn't reload immediately when I made changes to them (cached?) and have avoided it since. Don't know if other people have ever run into this?




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

Search: