In live-reload, if hostname is empty, set it to localhost.