format probable server URL when printing to the console at launch

pull/1/head
ansuz 8 years ago
parent 802146e2af
commit e631818268

@ -138,7 +138,13 @@ app.get('/api/config', function(req, res){
var httpServer = httpsOpts ? Https.createServer(httpsOpts, app) : Http.createServer(app);
httpServer.listen(config.httpPort,config.httpAddress,function(){
console.log('[%s] listening on port %s', new Date().toISOString(), config.httpPort);
var host = config.httpAddress;
var hostName = !host.indexOf(':') ? '[' + host + ']' : host;
var port = config.httpPort;
var ps = port === 80? '': ':' + port;
console.log('\n[%s] server available http://%s%s', new Date().toISOString(), hostName, ps);
});
var wsConfig = { server: httpServer };

Loading…
Cancel
Save