machinalis / iepy

Information Extraction in Python
BSD 3-Clause "New" or "Revised" License
905 stars 186 forks source link

About runserver #109

Closed JianyuZhao7 closed 7 years ago

JianyuZhao7 commented 7 years ago

When I try to finish the first instance for test, one problem occurs. After I command "python bin/manage.py runserver", I try "curl "127.0.0.1:8000" and there shows nothing at my ubuntu command lines.
And the first step "1 - Loading the database" and the second step "2 - Pre-processing the data" are both well done. So, could anyone can tell me how to solve it? Thanks a lot.

jmansilla commented 7 years ago

Hi!

You'll need to access that URL with a browser.

JianyuZhao7 commented 7 years ago

@jmansilla Thanks. I've tried to access the URL with Chrome just like" 114.113.233.186:8000" to browse the ubuntu server on my local win8 computer , but nothing occurs. And I think the first step is to confirm whether there is any content on the ubuntu server. So I try curl "127.0.0.1:8000" . I think if the "python bin/manage.py runserver" succeed, there will shows content. Right?

JianyuZhao7 commented 7 years ago

@jmansilla what's more, I have to use the browser locally. Is it true?

j0hn commented 7 years ago

@JianyuZhao7 i'm not sure i got you correctly, but if you want to run the server on one machine and browse from another (in the same network) you have to run the server like this:

python bin/manage.py runserver 0.0.0.0:8000

and use the server's machine ip to browse.

If you want to browse it from a machine on another network (or over the internet) you might want to try ngrok or some sort of tunnel that can map a url to your local machine. Let me know if you need more details about this.

JianyuZhao7 commented 7 years ago

@j0hn Thanks a lot. I've solved the problem using ngrok. What a great tool it is.