Fixed bug in host & port in messages

Updated sample apps to use config