index.py
651 Bytes
from flask import Flask, request
from flask_restplus import Resource, Api, fields
import process
import save_image
app = Flask(__name__, static_url_path='/static')
api = Api(app, version='1.0', title='FlaskLocal', description='FlaskLocal')
@app.route('/process', methods=['POST'])
def post():
#print(request.form)
res = node.ProcessImage(request.form)
return res
@app.route('/save', methods=['POST'])
def postImage():
#print(request.form)
res = save.Save(request.form)
return res
if __name__ == '__main__':
node = process.Process()
save = save_image.SaveImage()
app.run(host='0.0.0.0', port=80, threaded=False)