Honestly, I am really stuck here. A colleague and I have been working on this for the past day or so and we don't know to get a python file working with Twisted Web. Twisted web is a stand-alone server with a built-in WSGI container, so I want to make the figure from the python file available at port 8080
This is the command line that I am using for running an application using twisted web. And yes, it is spelled 'twistd web' on the command line.
twistd web --wsgi civfdemo.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: 'civfdemo.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='CIVF'),
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()