You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running in prod mode it reports that it is running at http://localhost. It's a minor thing, but 0.0.0.0 is not localhost (127.0.0.1), it's bind to all addresses, and it sent me up the garden path debugging for a long time when I'd simply mistyped api_url as app_url in rxconfig.py. 😱
Specifics (please complete the following information):
Python Version: 3.10.12
Reflex Version: 0.2.4
OS: Linux
Browser (Optional): N/A
Additional context
It looks like it is coming from from Next.js logging this: ready started server on 0.0.0.0:3000, url: http://localhost:3000. 0.0.0.0 is not localhost - 127.0.0.1 so it's misleading. Next.js (if that's what is reporting that line) is telling a porky.
exec.py parses that and reports the wrong info with these lines.
if "ready started server on" in line:
url = line.split("url: ")[-1].strip()
console.print(f"App running at: [bold green]{url}")
Thanks. 🙏
The text was updated successfully, but these errors were encountered:
…eflex apps off the same domain, and 1583 Show the correct info on where the site is being served. (#1724)
* Support setting Next.js basePath in Reflex config. (#1633)
- Tests.
- And sorted config in next.config.js template.
* Display the correct running at url with basePath if it is set. (#1583)
* Formatting, fixed by black.
* Fix indenting in test data.
* Fixed that conflict resolution shouldnt have included console.debug line.
* Rmove use of :=. Add http:// to url. Use urljoin to build url.
Describe the bug
When running in prod mode it reports that it is running at
http://localhost
. It's a minor thing, but0.0.0.0
is not localhost (127.0.0.1
), it's bind to all addresses, and it sent me up the garden path debugging for a long time when I'd simply mistypedapi_url
asapp_url
inrxconfig.py
. 😱root@droplet:~/webchat/webui# reflex run --env prod --frontend-port 80 ──────────────────────────────────────────────────────────────────────────────────────────────── Starting Reflex App ──────────────────────────────────────────────────────────────────────────────────────────────── Compiling: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 1/1 0:00:00 Creating Production Build: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 9/9 0:00:57 ──────────────────────────────────────────────────────────────────────────────────────────────────── App Running ──────────────────────────────────────────────────────────────────────────────────────────────────── App running at: http://localhost:80 Compiling: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 1/1 0:00:00
To Reproduce
As above, run with
--env prod
.Expected behavior
App running at: http://0.0.0.0:80
Screenshots
N/A
Specifics (please complete the following information):
Additional context
It looks like it is coming from from Next.js logging this:
ready started server on 0.0.0.0:3000, url: http://localhost:3000
.0.0.0.0
is notlocalhost
-127.0.0.1
so it's misleading. Next.js (if that's what is reporting that line) is telling a porky.exec.py
parses that and reports the wrong info with these lines.Thanks. 🙏
The text was updated successfully, but these errors were encountered: