Run a dash app inside a flask app


I currently have a flask app and I want to implement a dash app into it. However I’ve been running into multiple errors and I don’t really understand the document for dash deployment. Here is my code

server = Flask(__name__) 
def dash_chart():

if __name__ == "__main__":

def start():
    app = dash.Dash(__name__)
    app.layout = html.Div('Hello World')
    if __name__=='__main__':


Is there a specific reason to have two separate scripts for this?
Will something like this solve your problem:

server = flask.Flask(__name__)
app = dash.Dash(__name__, server=server)

app.layout = html.Div(
            **stuff goes here**

if __name__ == '__main__':
	app.run_server(debug=True, port=8050, host='')

That’s how I’ve implemented my stuff and it works like a charm. :man_technologist: