Closed hexsum closed 8 years ago
I Just find out the "Server available" in many place......
find ./ -type f|xargs grep 'Server available at'
./lib/Mojolicious/Guides/Cookbook.pod: Server available at http://127.0.0.1:3000
./lib/Mojolicious/Guides/Cookbook.pod: Server available at https://[::]:3000
./lib/Mojolicious/Guides/Cookbook.pod: Server available at http://127.0.0.1:3000
./lib/Mojolicious/Guides/Cookbook.pod: Server available at http://127.0.0.1:3000
./lib/Mojolicious/Guides/Cookbook.pod: Server available at http://127.0.0.1:3000
./lib/Mojolicious/Guides/Cookbook.pod: Server available at http://127.0.0.1:8080
./lib/Mojolicious/Guides/Cookbook.pod: Server available at http://127.0.0.1:8080
./lib/Mojolicious/Guides/Growing.pod: Server available at http://127.0.0.1:3000
./lib/Mojolicious/Guides/Tutorial.pod: Server available at http://127.0.0.1:3000
./lib/Mojolicious/Guides/Tutorial.pod: Server available at http://127.0.0.1:8080
./lib/Mojolicious/Guides/Tutorial.pod: Server available at http://127.0.0.1:3000
./lib/Mojo/Server/Daemon.pm: $self->app->log->info("Server available at $url");
./lib/Mojo/Server/Morbo.pm: Server available at http://127.0.0.1:3000
./README.md: Server available at http://127.0.0.1:3000
I'm afraid this inconsistency is intentional, we used to get regular complaints when the message didn't say "http://127.0.0.1:3000" back in the days. In fact, you're the first one to complain about this version in years. So, i believe that no changes are necessary.
ok, I am a perfectionist and Obsessive compulsive disorder
Picking up this issue instead of opening a new one. Using the vite proxy feature of quasar to http://localhost:3000 lead to a non-working configuration when my host has IPv6 connectivity because localhost then resolves to ::1 instead of 127.0.0.1. I'd suggest to keep that configuration case in mind and listen on all available IP protocols or IPv6 only. Maybe the underlying code already supports using localhost instead of 127.0.0.1 which might fix the issue as well.
print the following message:
but actually the server is listenging on ‘0.0.0.0’
I think this makes people confused.
Also, I think the following source code in
Mojo/Server/Daemon.pm
is ugly and unfriendly and inconsistent with the contextline 200
: the$self->app->log->info
actually doesn't work because the default appMojo::HelloWorld
set the log level as "error"line 202
: Should this line be$url->host('0.0.0.0') if $url->host eq '*';
line 203
:I don't understand why we don't write$self->app->log->info("Server available at $url")
instead ofsay "Server available at $url"
a path may be like this: