Update appy.js

Correcting logic when an empty host is given as a parameter