Skip to content

Commit

Permalink
Correct the IP address displayed by server
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mrjohannchang committed Jul 30, 2014
1 parent 083187f commit e3f0a36
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/plugins/console/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit e3f0a36

Please # to comment.