How do you play melee heroes without getting harassed to death? Juggernaut Dota 2 Heroes

On the other hand, when I'm playing melee like Juggernaut, I do really well in team fights but horribly in lane. Farming is near impossible with a ranged (or two) opponents in lane taking potshots at me, and since they're so far away from me and so close to their tower I can't harass them back.