I am on a windows 64-bit machine following documentation from https://developers.google.com/docs/api/quickstart/js to use the google docs api. As per the instructions, I've downloaded and installed python 3.8 (from https://www.python.org/downloads/) and have set up the index.html file with the client ID and API key placeholders replaced. After running the command python -m http.server 8000 in the visual studio code terminal and opening http://localhost:8000 in the browser, it says the site can't be reached and localhost is refusing to connect. Would anyone happen to know what the issue is? Thanks.
Asked
Active
Viewed 1,648 times
1 Answers
0
I had the same issues and it appeared to be an issue with the default binding. This has been fixed in Python3 using the bind parameter.
python -m http.server 8000 --bind 127.0.0.1

MKZ
- 166
- 1
- 12
-
Unfortunately it still doesn't work - I've attached a screenshot of the terminal in the question and none of the commands seem to work - do I need to do anything other than clicking on the downloaded .exe file to install python? – user11508332 Jan 06 '20 at 08:22
-
or is it an issue I'm using python for 32-bit when I'm on a 64 bit machine? – user11508332 Jan 06 '20 at 08:24
-
have you tried creating a .py file and start it from there or open this server in the python interpreter. Or maybe reinstall it via "pip install http" – MKZ Jan 15 '20 at 08:56