diff options
| author | Pinapelz <yukais@pinapelz.com> | 2023-11-17 13:24:42 -0800 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2023-11-17 13:24:42 -0800 |
| commit | 96019367e8f72eac26abd3b7a908c2b914bd1ae1 (patch) | |
| tree | fa7dbe66ea8b12bde0970dc8db27f7601464b3b8 /backend/app.py | |
| parent | c159e86a3487dbae79de8d0887f288625084bfcd (diff) | |
v2: add initial Next JS files, remove static templates
Diffstat (limited to 'backend/app.py')
| -rw-r--r-- | backend/app.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/backend/app.py b/backend/app.py new file mode 100644 index 0000000..51b0dbb --- /dev/null +++ b/backend/app.py @@ -0,0 +1,22 @@ +""" +Flask app for serving the static files +""" +from flask import Flask, send_file, send_from_directory, jsonify, abort +from flask_cors import CORS + +app = Flask(__name__) +CORS(app) + + +@app.route('/') +def main_page(): + return "We are offline at the moment" + + +@app.errorhandler(404) +def not_found(error): + return jsonify(error=str(error)), 404 + + +if __name__ == "__main__": + app.run(debug=True) |
