Created
February 6, 2018 22:38
-
-
Save AntoineDao/6d88160e4d2d497a8a4345a2b6d8d0ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
app = Flask(__name__) | |
import subprocess | |
process = 0 | |
@app.route('/') | |
def hello_world(): | |
return 'Hello, World!' | |
@app.route('/process') | |
def launch_process(): | |
p = subprocess.Popen("sudo moonlight stream", shell=True) | |
return str(p.pid) | |
if __name__ == '__main__': | |
app.run(debug=True, host='0.0.0.0') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment