diff --git a/README.md b/README.md index fb51ebb..9f55599 100644 --- a/README.md +++ b/README.md @@ -97,8 +97,8 @@ serve({ // execute function after server has begun listening onListening: function (server) { - const address = server.getAddress() - const host = address.host === '::' ? 'localhost' : address.host + const address = server.address() + const host = address.address === '::' ? 'localhost' : address.address // by using a bound function, we can access options as `this` const protocol = this.https ? 'https' : 'http' console.log(`Server listening at ${protocol}://${host}:${address.port}/`)