Skip to content Skip to sidebar Skip to footer

Communicating With Python Program Running On Server

I'm trying to create a control system that will run on a Raspberry PI configured as a server. I'll have a python program running on the server that will control a process (i.e. te

Solution 1:

The easiest thing would be install Flask:

from flask import Flask
app = Flask(__name__)

@app.route("/")
def main():
    return "Hey cool, it works!"

if __name__ == "__main__":
    app.run("0.0.0.0", port=80, debug=True) # Might have to run as sudo for port 80

Post a Comment for "Communicating With Python Program Running On Server"