fully functional program with node.js server communication