dash icon indicating copy to clipboard operation
dash copied to clipboard

How can I run Dash automatically?

Open fdkssdks opened this issue 8 years ago • 5 comments

Hello,

I am trying to figure out how can I run Dash automatically instead of going to the local server manually.

Is there a parameter like below?

app.run_server(debug=True, start_browser=True)

Thanks

fdkssdks avatar Aug 13 '18 20:08 fdkssdks

There is no option to open the browser automatically, you can however put a hook to open it with IDE configs. In pycharm, just add a before launch > launch web browser in your run/debug configurations.

T4rk1n avatar Aug 13 '18 20:08 T4rk1n

Can I convert my Dash to an Desktop App so I run it by double clicking it?

On Aug 13, 2018 10:21 PM, "Philippe Duval" [email protected] wrote:

There is no option to open the browser automatically, you can however put a hook to open it with IDE configs. In pycharm, just add a before launch

launch web browser in your run/debug configurations.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/plotly/dash/issues/329#issuecomment-412650313, or mute the thread https://github.com/notifications/unsubscribe-auth/AQRJX--2SetM6Hb3yVXwRDSse7qavXgaks5uQd_YgaJpZM4V7KVQ .

miguelbambo avatar Aug 13 '18 20:08 miguelbambo

@T4rk1n Not even if I use Flask or something similar with threading?

fdkssdks avatar Aug 13 '18 20:08 fdkssdks

You can open the browser with just python:

if __name__ == '__main__':
    import webbrowser
    webbrowser.register('chrome', None)
    webbrowser.open('http://localhost:5050')
    app.run_server(port=5050, debug=True, threaded=True)

T4rk1n avatar Aug 13 '18 20:08 T4rk1n

It's working. Thanks, a lot.

fdkssdks avatar Aug 13 '18 21:08 fdkssdks