from flask import Flask, render_template
from hivebee.dashboard.api import api

def create_app():
    app = Flask(__name__, template_folder='templates')
    app.register_blueprint(api)

    @app.route('/')
    def index():
        return render_template('index.html')

    return app

if __name__ == '__main__':
    app = create_app()
    app.run(host='0.0.0.0', port=5000, debug=False)
