This is the approach I took with my book/videos at AngularOnRails.com, a "side project that makes money".
Another important thing is to surround yourself with people who have successfully done the thing you're trying to do.
I don't have much time right now but if you (or anybody) wants to talk about building side projects that make money, feel free to email me at jason@angularonrails.com. I'm not an expert but I know a hell of a lot more than I did 9 years ago when I started.