The way you use that leverage is then explain why you feel something is not fair. In a professional context, you can explain your position in legal terms when you take a compassionate, kind stance, smile and analytically explain the situation from both sides.
It's no more different than handling a code review.
Now, two things can happen: Either your employer is amazed that you both created a new product AND can navigate business negotiations. This is good for your career (unless your employer is an idiot).
Note that creating a new product that people love increases your market worth tremendously (unless you are already at a fairly well compensated level).
Traditionally the simplest way to compensate employees has been to give them a raise. Hint - you could ask this :)
The funny thing a higher pay grade does is that suddenly management will respect you more (we pay him x dollars so he must be awesome).
Or, the second case: you find out your employers 'mr. Niceguy' culture is actually a charade to fool people working at below market rates. At which point the fate of your sideproject totally depends on the legal feedback you received. And it would be better for you to find a better employer.
There are really good books on negotiation and influence. I suggest you read them when you have the time. Examples: Cialdini, 'Influence'. Voss, 'Never split the difference'.
The employer might be under the impression that all the terms in the employment contract they pulled off FreeLegalTemplates.net are enforceable when they aren't. Going to a lawyer first gives you the ammunition to politely point out that you are in fact the one in the right here.
If you don't want to spend money on lawyers, at least read all relevant laws (which is important even if you have lawyer around you).
It's also better if your company doesn't know about your preparation, as it can be used as defence weapon in the negotiations only if you would get a worse position than what you have rights for anyways. Preparing in secret also helps you get more evidence for your case.
A 30 minute session with a lawyer will give you much more insight in to how to deal with this situation more than what you can learn from an internet forum.
If you don't want to do even that then my advice to you would be to hand over the code, fork it, leave this employer and call it a day.
You may have to reset your expectations about walking away with both compensation AND control.
You should do so as well, to be on the same footing. This lets you negotiate with confidence, you'll understand your BATNA and the terms of your contract with the business.
I probably should have cleared this out in my original post (my bad) that I do not wish to pursue the legal route. I personally feel that in my case, it will just drain everyone's energy for not much gain at the end. Also, personal relationships matter to me as well.
I'm trying to find ways to get compensated for the time and effort I've put into it. If not financially, then in some other forms. But I don't have any ideas.