diff --git a/party/__init__.py b/party/__init__.py index d406c0e..5cab89c 100644 --- a/party/__init__.py +++ b/party/__init__.py @@ -2,6 +2,3 @@ import party.main as main def create_app(): return main.app - -if __name__ == '__main__': - create_app().run(debug=True, host='localhost', port=5000) #pragma: no cover diff --git a/party/main.py b/party/main.py index 43f5102..0210ffa 100644 --- a/party/main.py +++ b/party/main.py @@ -1,12 +1,14 @@ -from flask import Flask, jsonify +from flask import Flask, jsonify, render_template -app = Flask(__name__) +app = Flask(__name__, + template_folder='templates', + static_folder='static',) @app.route('/', methods=['GET']) def index(): response = jsonify(success=True) response.status_code = 200 - return response + return render_template('index.html') @app.route('/api', methods=['GET']) def api(): @@ -79,3 +81,6 @@ def api_music_add_song(): response = jsonify(success=True) response.status_code = 200 return response + +if __name__ == '__main__': + app.run(debug=True, host='localhost', port=5000) #pragma: no cover diff --git a/party/static/css/style.css b/party/static/css/style.css new file mode 100644 index 0000000..d779fce --- /dev/null +++ b/party/static/css/style.css @@ -0,0 +1,4 @@ +body { + background-color: black; + color: white; +} diff --git a/party/templates/index.html b/party/templates/index.html new file mode 100644 index 0000000..55a01e7 --- /dev/null +++ b/party/templates/index.html @@ -0,0 +1,11 @@ + + +
+ +