Simple http server #546

Closed
opened 2025-11-19 20:46:03 -06:00 by GiteaMirror · 8 comments
Owner

Originally created by @Yamakaky on GitHub (Jun 16, 2015).

python3 -m http.server <port> and python2 -m SimpleHTTPServer <port> launches a simple http server in the current directory.

Originally created by @Yamakaky on GitHub (Jun 16, 2015). `python3 -m http.server <port>` and `python2 -m SimpleHTTPServer <port>` launches a simple http server in the current directory.
Author
Owner

@alebcay commented on GitHub (Jun 17, 2015):

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.

@alebcay commented on GitHub (Jun 17, 2015): This appears to be a Python built-in, and not a shell program. If anything, this should go under [awesome-python](https://github.com/vinta/awesome-python). Thanks for your contribution, though.
Author
Owner

@Yamakaky commented on GitHub (Jun 17, 2015):

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.

@Yamakaky commented on GitHub (Jun 17, 2015): 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.
Author
Owner

@alebcay commented on GitHub (Jun 17, 2015):

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.

@alebcay commented on GitHub (Jun 17, 2015): 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_.
Author
Owner

@Yamakaky commented on GitHub (Jun 17, 2015):

And ? It's built into python, not bash

@Yamakaky commented on GitHub (Jun 17, 2015): And ? It's built into python, not bash
Author
Owner

@alebcay commented on GitHub (Jun 17, 2015):

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?

@alebcay commented on GitHub (Jun 17, 2015): 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](https://gist.github.com/willurd/5720255)?
Author
Owner

@Yamakaky commented on GitHub (Jun 17, 2015):

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.

@Yamakaky commented on GitHub (Jun 17, 2015): 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.
Author
Owner

@alebcay commented on GitHub (Jun 17, 2015):

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.

@alebcay commented on GitHub (Jun 17, 2015): > 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.
Author
Owner

@Yamakaky commented on GitHub (Jun 18, 2015):

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.

@Yamakaky commented on GitHub (Jun 18, 2015): 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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/awesome-shell#546