Simple http server
Yamakaky opened this issue · 8 comments
python3 -m http.server <port>
and python2 -m SimpleHTTPServer <port>
launches a simple http server in the current directory.
This appears to be a Python built-in, and not a shell program. If anything, this should go under awesome-python. Thanks for your contribution, though.
ok, but you also need to install the others tools, so why python is different ? One doesn't need to know python to use this command.
Sorry if I misunderstood this tool; http.server
/ SimpleHTTPServer
is built into Python, right? The shell programs in this list are external programs, not built-ins.
And ? It's built into python, not bash
I see your point about it not being built into Bash. How would you suppose I make an entry for it then? What page would I point the entry for it to?
By this logic, should I also add all one-liner HTTP servers that can be implemented into programming languages, as seen here?
Not all one-liner, only the best/simplest. Python is installed by default on a lot of computers, so it's pretty available, whereas ngincat and bashttpd need to be installed. Plus the command is short.
Not all one-liner, only the best/simplest.
Who gets to decide that? My idea of simple would probably be ruby -run -ehttpd . -p8000
or php -S 127.0.0.1:8000
and evidently your, as well as anyone else's, idea of what is best or simplest will probably be different.
...it's pretty available, whereas ngincat and bashttpd need to be installed
That's the point. This list is pretty much only for things that need to be installed. The list is for tools with a specific purpose. The tools for networking in the list right now do need to be installed, but they do a single job, and they do it pretty well, unlike the Python solution, which is part of Python - a programming language, not designed specifically for networking.
Sorry, I wasn't saying the python version is the best, I meant you should keep the simplest command.
I didn't understand it was only for installed packages.