API: local server is not necessarily 127.0.0.1

Modification proposed by Rick Jongbloed
Merge pull request #15 from Jerome-github/custom_local_IP

API: local server is not necessarily 127.0.0.1