I am making an app with flutter frontend and python backend. The problem is that I need to create a flask server running offline locally on an Android or iOS device. I don't know how to start the server simultaneously with the app to push some http requests to the server.
The server is basically:
from flask import Flask, request, jsonify
import socket
import threading
import paramiko
app = Flask(__name__)
@app.route('/function_name', methods=['POST'])
def function():
....
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000)
source https://stackoverflow.com/questions/76086999/how-to-start-a-flask-server-on-android-ios-in-backend
Comments
Post a Comment