If you are not living in a city with plenty of developer jobs available then that's often not possible and you are stuck to the boring job "for money" scheme. Of course you can always relocate but this has its own downsides...
If you really go crazy alone you can always find coworking space almost anywhere in the world.
Moreover, constantly look for opportunities. I recently heard very wise words that the best time to change your job is when you are perfectly happy with current one.