Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no need for python -m SimpleHTTPServer when we have http-server for node #15

Closed
Pomax opened this issue Jan 21, 2015 · 6 comments
Closed

Comments

@Pomax
Copy link
Contributor

Pomax commented Jan 21, 2015

Given that most people will come here because they use node, recommending something like http-server (installed like everything else with npm install -g http-server) probably makes more sense than to tell people to use Python's http server (also, remembering and typing out the Python command is a pain, whereas http-server is easy to remember and is a 'single' word =)

@tapio
Copy link
Owner

tapio commented Jan 22, 2015

Python tends to be more readily available (e.g. installed by default on most Linux distros) than Node. If you are going to npm install something to get a tiny development server, might as well npm install live-server 😄

@tapio tapio closed this as completed Jan 22, 2015
@Pomax
Copy link
Contributor Author

Pomax commented Jan 22, 2015

Python is only installed by default on OSX, as far as I know. Not all linux auto-install it, and Windows sure as hell doesn't come with Python (installing it is a small pain because the official release is a third party installer)

On the other hand, because people come here for live-server, you know they already have node and npm installed. Why not tell them to use something they can install the exact same way they would live-server for when live-server isn't enough? (which is what that line in the README was about. Saying "if liver-server isn't enough, install live-server because you're already using node" makes very little sense ;)

@tapio
Copy link
Owner

tapio commented Jan 22, 2015

The thing is we don't know if people have Node installed. They can find live-server through a Google search and maybe not even have heard of Node.js, at which point they need to install node whether they'd like to use live-server or http-server. My rationale for giving that python example is a) given a random machine, I think there's a greater chance that python is installed than node (even now two years after I wrote the initial readme, but feel free to argue otherwise) and b) http-server example would be two lines and require additional install:

npm install -g http-server
http-server

(Still, maybe I'll add that as an alternative, or remove the thing altogether).

@Pomax
Copy link
Contributor Author

Pomax commented Jan 22, 2015

my 2 cents there is that that's being needlessly confusing. While, indeed, they might find it through google, how are they going to install live-server without npm? And if they already use python and need a live server, why would they even bother with a node module instead of using pip installed livereload?

Basically I don't understand why you'd advocate using another scripting language when the only way to install live-server itself is to have node. Saying "if you don't have node, use Python", fair enough, but in this case the README says 'if you need more, use python', and that doesn't make sense =)

Also, don't undersell your userbase: you get hundreds of dowloads per week through npm - all those people have node ;)

@tapio
Copy link
Owner

tapio commented Jan 23, 2015

but in this case the README says 'if you need more, use python', and that doesn't make sense =)

Where did you get that? It says: "If you don't want/need the live reload, you should probably use something simpler, like the following Python-based one-liner:" (emphasis added)

Also, don't undersell your userbase: you get hundreds of dowloads per week through npm - all those people have node ;)

Npm is pretty much the only way live-server is distributed, so naturally most downloads come from there. There is however no way of knowing how many of them needed to install node and npm just to get live-server. The thing I'm trying to say between the lines with the python one-liner is: If you just need a quick server and don't care about live reload, you already might have that if you have python, so you don't need to sweat about installing node and an additional package.

@Pomax
Copy link
Contributor Author

Pomax commented Jan 23, 2015

hah, that's me totally misreading! But on the second note: can the readme be reworded or ammended to not ignore the huge population of windows users? =)

(by all means keep the python line in there, but help those users without python installed out by saying that python's a decent choice if you already have it, but that otherwise live-server's the easiest or something. Right now it reads like everyone should already be able to do so, and I know for a fact that there's tons of people for whom this will be a head scratcher, about as likely to already have node as they are to have python)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants