server: fix implementation of Host parsing

Go is playing some tricks on me :-(
server: implement main function