I can only say that you don't know the ground reality. And leave aside China, reason being Nepal is a land lock country, and most of the roads and most of the people of Nepal are close to India. Nepal being an independent country is free to build roads and resources to get goods from anywhere. But the amount of closeness with India -- Trade, people, social, language, culture, religion is too much for China to replace. Like India, in Nepal there are few sections of people who find attractive to the Communist regime, rather than democracy. Because to handle a country democratically is difficult, and even Pakistan knew it well, luckily for India, the root of democracy is embedded deep inside, and the leaders have given their best contribution, to ensure that it remains strong enough. For your sake, Nepal have chosen the Democracy, the same path which India took, and its constitution is highly influenced by Indian Constitution, rather than the path chosen by the PRC, a party which have a country named China, and a army called PLA.
There could be few things, in which Nepal and India don't agree, and there could be various things, in which both countries don't share similar views, and it should be like that, because each country should consider their own Interest on the top priority.
As far as train is considered, a quick look on the geography will be enough to burst the bubble of your fantasy. A couple of few things for your reminder.
1. There have been a train track, from India to Nepal, from the British times, but for a country like Nepal, land transport was more cheaper, and advantageous owing to the mountainous terrain, and the initial cost involved in its setup. For India, its a matter of few years, when it could concentrate to make the balance shift to India.
2. During 1962, Nepal provided 2 units of its soldier to India, and gave its resources, and land if India needs them against China.
3. A quick google, will reveal, various Nepali people contribution in the struggle of independence of India.
4. A quick google will tell, all Nepali Officers gets training with the Indian Officers in NDA.
5. A quick google will tell, the first country for the help of the Nepal, during the earth quake, were people discovered the pottato chips with Beef Masala.