# Deployment issues on Heroku - multipage app layout

**URL:** <https://community.plotly.com/t/deployment-issues-on-heroku-multipage-app-layout/35315>\
**Category:** Dash Python\
**Created:** [February 22, 2020, 5:32am UTC](https://community.plotly.com/t/deployment-issues-on-heroku-multipage-app-layout/35315 "2020-02-22T05:32:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thomasmatt88](https://avatars.discourse-cdn.com/v4/letter/t/b38774/32.png) [@thomasmatt88](https://community.plotly.com/u/thomasmatt88)\
**Post date:** [February 22, 2020, 5:32am UTC](https://community.plotly.com/t/deployment-issues-on-heroku-multipage-app-layout/35315/1 "2020-02-22T05:32:58Z")

</div>

I do not have a multipage application but I am attempting to use the flat project layout from [URL Routing and Multiple Apps | Dash for Python Documentation | Plotly](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

```auto
web: gunicorn index:server

```

in my procfile. However, I receive the error  
“”“Failed to find attribute ‘server’ in ‘index’”""  
My code base is [GitHub - thomasmatt88/NCAMP-dashboard: NCAMP, the National Center for Advanced Materials Performance, works with the FAA and industry partners to qualify material systems and populate a shared materials database that can be viewed publicly. This is a dashboard for viewing NCAMP materials database.](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

```auto
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

```auto
if __name__ == ' __main__':
    #don't use debug = True on production server
    app.run_server(debug=True)

```

---

<div class="post-metadata">

**Author:** ![thomasmatt88](https://avatars.discourse-cdn.com/v4/letter/t/b38774/32.png) [@thomasmatt88](https://community.plotly.com/u/thomasmatt88)\
**Post date:** [February 22, 2020, 6:53am UTC](https://community.plotly.com/t/deployment-issues-on-heroku-multipage-app-layout/35315/2 "2020-02-22T06:53:41Z")

</div>

Problem solved by following this stack overflow answer

> <https://stackoverflow.com/questions/58873457/gunicorn-20-failed-to-find-application-object-app-server-in-index>

---

<div class="post-metadata">

**Author:** ![carlc](https://avatars.discourse-cdn.com/v4/letter/c/b5ac83/32.png) [@carlc](https://community.plotly.com/u/carlc)\
**Post date:** [July 31, 2020, 3:09am UTC](https://community.plotly.com/t/deployment-issues-on-heroku-multipage-app-layout/35315/3 "2020-07-31T03:09:39Z")

</div>

There’s a good solution [here](https://community.plotly.com/t/deploying-multi-page-app-to-heroku-not-deploying-as-set-up/7877/8) too.
