Hi, I have been struggling to get this sample dash file working with Twisted Web server. I am using Conda and created a new environment using a Windows machine.
This is the command line that I am using for running an application using twisted web.
twistd web --wsgi labdemo.py --port tcp:8080
And below is the civfdemo.py file. What is the proper syntax in the command line and in the python file to get this working? Presently, the error message the I get is as follows: No such WSGI application: 'labdemo.py’
import dash
import dash_core_components as dcc
import dash_html_components as html
app = dash.Dash()
server = app.server
text_style = dict(color=’#444’, fontFamily=‘sans-serif’, fontWeight=300)
plotly_fig = [dict(x=[1,2,3], y=[2,4,8])]
app.layout = html.Div(children=[
html.H1(children=‘Chart1’),
html.Div(children='''
Dash: A web application framework for Python.
'''),
html.P('Enter a Plotly trace type into the text box,' \
'such as histogram, bar, or scatter.', style=text_style),
dcc.Graph(id='plot1',
figure = {
'data' : plotly_fig , 'layout' : {
'title' : 'Test Progress'
}
}
)
])
if name == ‘main’:
app.server.run()