how to use a variable to define a directory flask python3

Solution
from flask import Flask

app = Flask(__name__)

index_dir = "/"

@app.route(index_dir)
def index():
    return "hello_world"

if __name__ == '__main__':
    app.run(host="0.0.0.0")