Web server in one line of bash
razvantudorica.com
Web server in one line of bash
1–10 of 69 posts
Re: Web server in one line of bash
#2Neat trick, but probably too limited to be of much use. Also, stopping it is kind of a nuisance.
Re: Web server in one line of bash
#3If you have python, then these are really useful, just serves up the current directory.
Python 2.x:
python -m SimpleHTTPServer
Python 3.x:
python -m http.server 8000Re: Web server in one line of bash
#4> As root you can run:
Unless the specified 'index.html' is only readable by root, you don't have to be root to run that.
Only the low ports are restricted from regular users.
Re: Web server in one line of bash
#5Quite interesting, specially with the limitations of the file:// protocol
Re: Web server in one line of bash
#6[deleted]
Re: Web server in one line of bash
#7If you have python, then these are really useful, just serves up the current directory. Python 2.x: python -m SimpleHTTPServer Python 3.x: python -m http.server 8000
Easier to remember, plus Python is probably more likely to exist on a given machine than netcat.
Re: Web server in one line of bash
#8If you have python, then these are really useful, just serves up the current directory. Python 2.x: python -m SimpleHTTPServer Python 3.x: python -m http.server 8000
This is still my go-to solution, though I couldn't help but to share when I found the other solution.
Re: Web server in one line of bash
#9If you have python, then these are really useful, just serves up the current directory. Python 2.x: python -m SimpleHTTPServer Python 3.x: python -m http.server 8000
[deleted]
Re: Web server in one line of bash
#10I like woof,which is a single file and can also serve itself.