Black Lives Matter. Please consider donating to Black Girls Code today.

Simplest Example of Dash working with Flask

I saw on the Dash documentation that the simplest dash with flask code is this: ```import dash
import dash_core_components as dcc
import dash_html_components as html

app = dash.Dash(name)

app.layout = html.Div([
html.Div(
className=“app-header”,
children=[
html.Div(‘Plotly Dash’, className=“app-header–title”)
]
),
html.Div(
children=html.Div([
html.H5(‘Overview’),
html.Div(’’’
This is an example of a simple Dash app with
local, customized CSS.
‘’’)
])
)
])

if name == ‘main’:
app.run_server(debug=True)```

I changed app.run_server to be server.run to have the flask be the home page not the dash load first.
When I change return hello world to be render_index with its import as well, for an index.html, it does not load the template. I am pretty sure I have the file structure correct so I think this is something to do with dash. I saw a lot of examples of people integreting dash with flask successfully although the code was pretty hacky. I also saw that the Dash github has some merges that helped better incorporate flask. Can someone give me pointers on a simple flask app that renders a template with dash being seperate. I would really like to get into this more.