From 96019367e8f72eac26abd3b7a908c2b914bd1ae1 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Fri, 17 Nov 2023 13:24:42 -0800 Subject: v2: add initial Next JS files, remove static templates --- backend/app.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 backend/app.py (limited to 'backend/app.py') 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) -- cgit v1.2.3