How to connect a node to a mobile application?

This is a duplicate. See Connection refused, errno = 111, address = localhost, port = 57838 #0 - #4 by fabrice

Furthermore, if you are developing a mobile app, you most likely do not want to use kmd.