How old is the baby? Most babies won't sleep all night (I'm assuming you mean somewhere in the 8 hour range?) until they're at least a few months old. Their bodies metabolize their food so fast at this age, plus their tummies are so small to begin with, they can only take in so much at once. So even by feeding baby JUST before sleep, after a few hours the baby is likely to be getting peckish again. That being said, some babies are naturally great sleepers, and will sleep longer, at an earlier age than others. My first baby didn't sleep for more than about 4 or 5 hours until he was probably around 4 months, and didn't sleep all night (from bedtime, until he was ready to be up for the day) until probably around a year old. My second son, who's now almost 9 weeks old has been sleeping for 5-6 hours at night, waking for a quick 5 minute feed, and then sleeping again until morning (this is MOST nights, but it does vary some), pretty much all along. So much better at sleeping than my first!
It just depends on the baby... There are some tricks you can try to get baby sleeping longer (eat JUST before bed time, swaddling, and co-sleeping really makes a difference for some babies as well), but sometimes no matter what you do, they just won't seem to sleep for all that long.
Hang in there!