@thomasmatt88 wrote:
I do not have a multipage application but I am attempting to use the flat project layout from https://dash.plot.ly/urls so that I can have callbacks in a separate module. To deploy this layout to Heroku I believe I need
web: gunicorn index:server
in my procfile. However, I receive the error
“”“Failed to find attribute ‘server’ in ‘index’”""
My code base is https://github.com/thomasmatt88/NCAMP-dashboard where you can see I’ve attempted many deployment tests in my recent commits.Notably, I have this block of code in my app.py file
app = dash.Dash(__name__, external_stylesheets=[dbc.themes.BOOTSTRAP]) server = app.server #need to add this line for heroku deployment server.secret_key = os.environ.get('secret_key', 'secret') app.config.suppress_callback_exceptions = True
And this block of code in my index.py file
if __name__ == '__main__': #don't use debug = True on production server app.run_server(debug=True)
Posts: 2
Participants: 1