From e3f0a36a55fa4294185cf8a90c0a819a33c56021 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chang=20Yu-heng=20=28=E5=BC=B5=E6=98=B1=E7=8F=A9=29?= Date: Wed, 30 Jul 2014 10:43:16 +0800 Subject: [PATCH] Correct the IP address displayed by server Server shows wrong IP address it listens to before. It shows 0.0.0.0 while it is listening to localhost and vice versa. Also, we don't need another var only for displaying, just getting the var what server really got is enough. --- lib/plugins/console/server.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/plugins/console/server.js b/lib/plugins/console/server.js index 1729b1648f..86042c686a 100644 --- a/lib/plugins/console/server.js +++ b/lib/plugins/console/server.js @@ -35,10 +35,7 @@ module.exports = function(args, callback){ log.i('Using drafts.'); } - // for display purpose only - var ip = serverIp === '0.0.0.0' ? 'localhost' : serverIp; - - log.i('Hexo is running at ' + 'http://%s:%d%s'.underline + '. Press Ctrl+C to stop.', ip, port, root); + log.i('Hexo is running at ' + 'http://%s:%d%s'.underline + '. Press Ctrl+C to stop.', serverIp, port, root); /** * Fired after server started.