1
0
mirror of https://github.com/ZeroCatDev/ClassworksKV.git synced 2025-07-01 11:59:22 +00:00

Update server listening address to '0.0.0.0' for external access; modify console log to reflect new address format.

This commit is contained in:
SunWuyuan 2025-05-25 15:45:10 +08:00
parent 2b077553f7
commit 6cfa20fe76
No known key found for this signature in database
GPG Key ID: A6A54CF66F56BB64

View File

@ -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}`);
}