Ask coding questions

← Back to all posts
How to define python/flask site URL?
h
tomasztarnowski

Hi!
I've created simple flask app/website in python with webhook utilization.

As it is all working fine in console, how can I test it outside local env? To do so, I would like to create website/app URL, but I can't find this option.

Can anyone point the place for me? :-(

Voters
tomasztarnowski
Comments
hotnewtop
SixBeeps

When you create a web server, in your case with Flask, Replit automatically generates a URL that will redirect to your hosted website. For this to happen though, you need to host your server on the address 0.0.0.0. Once you do that, a new window will pop up showing the contents of your website.

AR199

To host a server, all you need to do is web_site.run(host='0.0.0.0', port=8080) There are a lot of handy tutorials on how to make a flask project, here is one: Flask Tutorial