mirror of
https://github.com/ZeroCatDev/ClassworksKV.git
synced 2025-07-01 20:09:23 +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:
parent
2b077553f7
commit
6cfa20fe76
4
bin/www
4
bin/www
@ -24,7 +24,7 @@ var server = createServer(app);
|
|||||||
* Listen on provided port, on all network interfaces.
|
* Listen on provided port, on all network interfaces.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
server.listen(port);
|
server.listen(port, '0.0.0.0');
|
||||||
server.on('error', onError);
|
server.on('error', onError);
|
||||||
server.on('listening', onListening);
|
server.on('listening', onListening);
|
||||||
|
|
||||||
@ -82,5 +82,5 @@ function onError(error) {
|
|||||||
|
|
||||||
function onListening() {
|
function onListening() {
|
||||||
var addr = server.address();
|
var addr = server.address();
|
||||||
console.log("可以在 http://localhost:"+addr.port+" 访问");
|
console.log(`Server running at http://0.0.0.0:${addr.port}`);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user