DON'T GIVE ANY FOOD UNTIL HE CAN KEEP WATER DOWN. Or any drink with calories init, for that matter.
All you are doing is feeding the tummy bug, not the child, don't give food when they can't even keep water down.
If it were me, I'd give loads of water until he had dry-retched a few times. This means he's puked the bugs out of his tummy (probably). Then give lots of small sips of water (little sip every 5 minutes). Stick with that regime for at least 2 hours.
He may at that point start clamouring for food. Don't believe him. Keep fobbing him off with small sips of water until he is climbing the walls with energy & getting almost tearful for food.
Then give him a little drink of a fluid, like milk or juice. Only about 3 oz. Go with a fluid because it still hydrates him even if I'm wrong & he does puke it back up. And it doesn't hurt so much to throw it back up, either.
Wait an hour minimum, ideally more like 2 hours.
By now he shoudl be ravenous & you will KNOW the throwing up bit is overwith. You can start feeding him pretty much as normal. Diarreha may take a bit longer, just keep his fluids up until that's gone too.
If you follow that advice, the tummy bug will be gone in about 4-5 hours.
If any of this advice goes wrong, start over. Go back to the beginning & offer big drinks of water until he's puked all the germ-laden bug out of his tummy.