Skip to content

Commit

Permalink
use 0.0.0.0 host
Browse files Browse the repository at this point in the history
  • Loading branch information
willydouhard committed May 15, 2023
1 parent d6eb479 commit 2ac9895
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions src/chainlit/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,16 @@ def run_chainlit(

# Open the browser if in development mode
def open_browser(headless: bool):
if not headless and config.chainlit_env == "development":
if not headless:
# Wait two seconds to allow the server to start
socketio.sleep(2)
webbrowser.open(f"http://127.0.0.1:{PORT}")
url = f"http://127.0.0.1:{PORT}"
logger.info(f"Your app is available at {url}")
webbrowser.open(url)

socketio.start_background_task(open_browser, headless)
# Start the server
socketio.run(app, port=PORT, debug=debug, use_reloader=False)
socketio.run(app, host="0.0.0.0", port=PORT, debug=debug, use_reloader=False)


# Define the "run" command for Chainlit CLI
Expand Down
2 changes: 1 addition & 1 deletion src/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "chainlit"
version = "0.1.1"
version = "0.1.101"
keywords = ['LLM', 'Agents', 'gen ai', 'chat ui', 'chatbot ui', 'langchain']
description = "A faster way to build chatbot UIs."
authors = ["Chainlit"]
Expand Down

0 comments on commit 2ac9895

Please sign in to comment.