1

I am a newbie with client-server development so please enlighten/help me solve this. Currently, I am working with a mobile application using react-native framework. This application will fetch data from my mock server. My mock server is written in python-flask.

The problem is that I cannot access the WEB service APIs in my mock server in different devices using this

http://[server-ip-address]:5000/{api-path}

. I already set the following configurations in the app.run.

app.run( threaded= True , host = '0.0.0.0', port = 5000)

I used Postman for PC and REST API app for android to simulate the client request. My devices is connected in the same network.

The ping works.

Also, I did monitor TCP data using wireshark if a requests were sent from the remote devices and I can see the data .

By the way this are my reference when I do my research.

Configure Flask dev server to be visible across the network

https://flask.palletsprojects.com/en/1.1.x/quickstart/#a-minimal-application

Atsui
  • 19
  • 3
  • Answers should not by nature include endorsements of products or services, so I'm just going to leave this as a comment. Use [ngrok](https://ngrok.com/). Open a tunnel linking port 5000 and you'll get a publicly available URL which will expose your local Flask instance to any device on the web. It's free and an awesome development tool for scenarios like this. – Chase Jun 28 '20 at 23:40
  • @Chase. Thank you. I can now access my mock server in different devices using ngrok. – Atsui Jun 29 '20 at 13:39

0 Answers0