From 6cfa20fe76db10523dc78948561c35226408b27a Mon Sep 17 00:00:00 2001 From: SunWuyuan Date: Sun, 25 May 2025 15:45:10 +0800 Subject: [PATCH] Update server listening address to '0.0.0.0' for external access; modify console log to reflect new address format. --- bin/www | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/www b/bin/www index d8e4142..01f4156 100644 --- a/bin/www +++ b/bin/www @@ -24,7 +24,7 @@ var server = createServer(app); * Listen on provided port, on all network interfaces. */ -server.listen(port); +server.listen(port, '0.0.0.0'); server.on('error', onError); server.on('listening', onListening); @@ -82,5 +82,5 @@ function onError(error) { function onListening() { var addr = server.address(); - console.log("可以在 http://localhost:"+addr.port+" 访问"); + console.log(`Server running at http://0.0.0.0:${addr.port}`); }