Webserver not being created

Question:

I used a threading to make a webserver for python, it shows that it did create but replit doesn’t create a webserver sp I can host it. Please help me to make replit create a webserver.

Repl link:

https://replit.com/@AvakinArsen1/WikiPedia-Discord-Bot?s=app

Hi there @AvakinArsen1! Currently, your flask app is running on 127.0.0.1 which is a loopback address, so your server is only accessible from itself rather than from a network. All you need to do is tell the flask server to serve on its public ip. You do this by changing the host parameter to 0.0.0.0 in the server run function.

TL;DR:
Change line 28 to:

app.run("0.0.0.0", port=8080)
3 Likes

Omg idk how to say my thanks. Love replit :heart:.

2 Likes

Click on the :heart: and the :ballot_box_with_check: underneath their post

1 Like

I’ve marked it as one!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.