A "connection refused" error is usually because the node is running on a different computer to the application, and the node has not been configured to allow incoming API requests from that other computer. Please search this Q&A forum for the word rpcallowip to see more information.