In example code, use localhost instead of hard-coded IP-address