Add possibility to use a specific hostname

I'd like to add the possibility to listen to a specific hostname or IP address. This listens to the environment variable HOST and keeps it empty by default (so by default it works as before) but by assigning localhost to HOST it only listens to localhost.