We review the ocurrence of inflation/dark energy eras from viable modified gravity. We consider mainly F(R) gravity, but also modified Gauss-Bonnet gravity. The emergence of neutron stars in such theory is discussed. The possibility of generalization for massive bigravity is mentioned.