Connecting Arduino, aREST API and node.js

Hi, so I am relatively new to arduino and networking in general so I would appreciate help. So, what I have is an adafruit CC3000 wifi shield. I am trying to use node.js to read the DDNS IP address from the shield everytime it updates. Currently, I am using aREST API to send my sensor values to the web. So is there anyway for the shield to directly send its IP address everytime it is changed to the server on node.js? I am also new to node.js so help on sending to the node.js server would be appreciated too. What I have so far is this.

My code was too long to upload so it is in the attached file.

Basically reading and sending my sensor values to the web using aREST API. The sensors are connected wirelessly to the shield via NRF24L01+ radio transmitters. Thank you.

example.ino (9.8 KB)