Python crud api

I am fairly new into programming, and I was asked to make a special project to code a crud API using python with sql database. I am currently using a template I found.

The problem is, when I run the code on visual studio code, I get a reply from Postman while when I run the same code here in Replit, Postman shows a “Could not send request” error.

Anyone might have an idea what am I missing or what I did wrong? Appreciate the help.
Here’s the link for my Replit main.py - crud - Replit

Hi @soFLY thanks for your question.

I’ve not used Postman before (this is an external service you are attempting to connect to the Repl is that right?). When I fork and run your code it starts the Flask app as normal.

However the URL 127.0.0.1:5000 you see there isn’t on your local machine, it is on the Replit server. If your MySQL database is also on your local machine, Replit won’t see that either.

Hope this helps but if not please explain in more detail what you see / do before you get the “Could not send request” error.

Change app.run() to

app.run(host="0.0.0.0")

So your repl’s website can be accessed externally