diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..e5f001e Binary files /dev/null and b/.DS_Store differ diff --git a/src/app.py b/src/app.py new file mode 100644 index 0000000..621588e --- /dev/null +++ b/src/app.py @@ -0,0 +1,24 @@ +from flask import Flask +from flask import jsonify + +app = Flask(__name__) +requ = "" + + +@app.route('/', defaults={'path': ''}) +@app.route('/') +def doRequest(path): + requ = +path + ' \n' + with open("test.txt", "a") as myfile: + myfile.write(requ) + return "None" + + +@app.route('/server-d/get') +def get(): + with open("test.txt", "r") as infile: + return 'we have something: ' + '\n '.join(infile.readlines()) + + +if __name__ == '__main__': + app.run(debug=True, host="0.0.0.0", port=6000) diff --git a/src/dockerfile b/src/dockerfile new file mode 100644 index 0000000..643443f --- /dev/null +++ b/src/dockerfile @@ -0,0 +1,10 @@ +from python:3.7 + +copy . /app +workdir /app + +run pip install -r requirements.txt +expose 7000 +entrypoint [ "python" ] + +cmd [ "app.py" ] \ No newline at end of file diff --git a/src/readme.md b/src/readme.md new file mode 100644 index 0000000..1d3c326 --- /dev/null +++ b/src/readme.md @@ -0,0 +1 @@ +dees is de mirror server \ No newline at end of file diff --git a/src/requirements.txt b/src/requirements.txt new file mode 100644 index 0000000..2077213 --- /dev/null +++ b/src/requirements.txt @@ -0,0 +1 @@ +Flask \ No newline at end of file diff --git a/src/test.txt b/src/test.txt new file mode 100644 index 0000000..567e458 --- /dev/null +++ b/src/test.txt @@ -0,0 +1,8 @@ +another request +another request +another request +another request +another request favicon.ico +another request +another request server-a +another request favicon.ico