Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

display "listening on ..." on startup #779

Open
teto opened this issue Jan 21, 2024 · 2 comments
Open

display "listening on ..." on startup #779

teto opened this issue Jan 21, 2024 · 2 comments

Comments

@teto
Copy link

teto commented Jan 21, 2024

I am trying to run luarocks.org and when starting I see:

sudo lapis serve
[sudo] password for teto: 
nginx: [alert] lua_code_cache is off; this will hurt performance in /home/teto/luarocks-site/nginx.conf.compiled:38
nginx: [warn] duplicate MIME type "text/html" in /home/teto/luarocks-site/nginx.conf.compiled:97
nginx: [alert] lua_code_cache is off; this will hurt performance in /home/teto/luarocks-site/nginx.conf.compiled:196
2024/01/21 18:34:51 [notice] 671747#671747: using the "epoll" event method
2024/01/21 18:34:51 [notice] 671747#671747: openresty/1.21.4.1
2024/01/21 18:34:51 [notice] 671747#671747: built by gcc 12.3.0 (GCC) 
2024/01/21 18:34:51 [notice] 671747#671747: OS: Linux 6.7.0
2024/01/21 18:34:51 [notice] 671747#671747: getrlimit(RLIMIT_NOFILE): 32768:32768
2024/01/21 18:34:51 [notice] 671747#671747: start worker processes
2024/01/21 18:34:51 [notice] 671747#671747: start worker process 671775

would it make sense to display host:port the application is listening to to help newcomers ?

@cycomachead
Copy link
Contributor

Yes, I would love this even for myself. :) I always forget which ports I dedicate to which apps.

Was about to just drop at print statement at the end of our app.lua file, but do think it'd be nice for basically everyone.

@leafo
Copy link
Owner

leafo commented Feb 23, 2024

I agree that lapis server could output some help information about the used environment and configuration when using openresty. The only discrepancy is that with openresty, it uses the config, and the config may be listening on many/different ports separate from what is included in the environment configuration.

When using server with the cqueues server backend it currently outputs that information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants