Problem with accessing the Flask server that I run

I have a weird problem with Replit.
I created a new Python project.
I tried running a Flask server in there - installed flask with pip - I get the logs in the console that the server is running. But all I get is this error:
[REPL URL] unexpectedly closed the connection.
I tried accessing the Repl URL using http, https, and changing ports from the defaults (80, 443), but it does not seem to work.

The weird part is that I created a new Repl with the Flask template and run it and it worked just fine.
so I copied the whole .py from the newly created project with flask template and pasted in the Python project that I mentioned earlier and it does not work as expected there.

I tried the same with JS and Express and got the same result. Are there any other thing to set up for the server in order to work in the Python project that I do not know of?

Oh and BTW I just have another Q. Is it not possible to edit the main article post here? I realized I had a few grammatical mistakes and wanted to fix them, but could not find the edit button.

It seems to be a problem with Replit and the ASIA server. Changing the Replit account location fixed my problem.
Users here had the same problem.

This is currently an open issue on status.replit.com:
https://status.replit.com/notices/wighlcn2m9pfcmen-some-users-new-repls-will-be-hosted-on-domains-with-a-url-replname-username-repl-co-rather-than-the-typical-replname-username-repl-co-while-we-resolve-an-internal-issue