If you have a piece of business logic that you want to make available in N languages/platforms, is Haxe a valid option? The only other alternative I know is to write a library in C/C++/Rust and use the FFIs in your target languages to call it.
I use it for some game development projects and its able to compile and run code on all Windows/Mac/Linux/iOS/Android (all native code) and even Javascript+WebGL.
Obviously the framework I use is targeted to games but there are other frameworks that target webdev (can target Node.js/PHP and lots of other things).
The framework is Luxe [1][2] and it/Haxe support the platforms I listed above really well (there are published/commercial games made with it on all platforms).
If you have any questions about it, their Gitter/chat [3] is pretty active.