And I am writing javascript code (in nodejs) to do transfer using bitcore-lib: https://bitcore.io/api/lib/transaction
I want the bitcore-lib to do the transfer/getbalance using full node running on my box. How can I achieve it?
Well, for this you can support your self with the core calls: https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list
To get the balance from your wallet you use the getbalance call:
bitcoin-cli getbalance
To send btc you can use the send to address call:
bitcoin-cli sendtoaddress 1BtcAddy 0.001
There is other way to send, the complex one, there you have to listunspent, then take the inputs you want for your transaction, then make the raw transaction, sign it and push it. As i say this is the complex way, but the right way for a perfect handle.