Dash Deployment on a VPS Server

Hi

I have managed to deploy a Flask app on the server.

When I tried to deploy a dash app on the server, I am getting only the dash ‘Loading…’ message.

Here’s a snapshot of the developer console. It can’t load the required javascript libraries

.

Please help. Any advice will be appreciated. I am so close to getting this deployed.

I have managed to reduced the errors after adding:

app.css.config.serve_locally = False
app.scripts.config.serve_locally = False

I am now getting 404 error on this:

You can check the deployed app here.
http://dash.eprojecttrackers.com/pythonapp/

In your browser, go to More Tools > Developer Tools or hit Ctl-Shift-J on windows/Cmd-Opt-I on Mac. You might see some errors in the Network tab up in the top right corner.

You probably have some error with duplicate component id names or something similar - it’s almost always the error I get. Congrats on figuring out how to deploy (mostly)!

Here’s the snapshot from the ‘network’ tab in the deveoper tool. My earlier snapshots are also from the developer tool. From the ‘console’ and ‘sources’ tabs.

Whoops. Do you use app = dash.Dash(__name__)?

Hi

I accidentally withdrew the post. Can you see the code I used?

import os

import dash
import dash_core_components as dcc
import dash_html_components as html
import flask

external_stylesheets = [‘https://codepen.io/chriddyp/pen/bWLwgP.css’]

app = dash.Dash(name, external_stylesheets=external_stylesheets)
server = app.server

app.css.config.serve_locally = False
app.scripts.config.serve_locally = False

app.layout = html.Div([
html.H2(‘Hello World’),
dcc.Dropdown(
id=‘dropdown’,
options=[{‘label’: i, ‘value’: i} for i in [‘LA’, ‘NYC’, ‘MTL’]],
value=‘LA’
),
html.Div(id=‘display-value’)
])

@app.callback(dash.dependencies.Output(‘display-value’, ‘children’),
[dash.dependencies.Input(‘dropdown’, ‘value’)])
def display_value(value):
return ‘You have selected “{}”’.format(value)

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

Yes I did. Here’s another snapshot.