feat(server): display a url when server starts to make it clickable

This commit is contained in:
Benedikt Rötsch
2018-02-21 14:06:06 +01:00
parent 6b78189a66
commit ba2eeadf58

View File

@@ -75,8 +75,6 @@ function onError (error) {
*/ */
function onListening () { function onListening () {
const addr = server.address() const addr = server.address()
const bind = typeof addr === 'string' const uri = typeof addr === 'string' ? addr : `http://localhost:${addr.port}`
? 'pipe ' + addr console.log(`Listening on ${uri}`)
: 'port ' + addr.port
console.log('Listening on ' + bind)
} }