mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-09 19:45:13 +02:00
10 lines
162 B
Python
10 lines
162 B
Python
|
|
import flask
|
||
|
|
|
||
|
|
app = flask.Flask(__name__)
|
||
|
|
|
||
|
|
|
||
|
|
@app.route('/run', methods=['POST'])
|
||
|
|
def run():
|
||
|
|
cmd = flask.request.json.get('cmd')
|
||
|
|
return {'out': eval(cmd)}
|