I am trying to develop one chrome-cast app for iOS/android using Ionic Framework and for that I need few NodeJS packages in my app. It is working from my desktop but I’m not sure how it will run on mobile devices where there is no Node run time available. So the first question is how to install or provide NodeJS run-time on iOS/Android devices and later if it is possible to package with iOS/Android app package.
You can use Node.js for Mobile Apps.
Pre-built binaries for the library are available for Android armeabi-v7a, x86, arm64-v8a, x86_64, and for iOS 64-bit.
More information, including some documentation, is available on the project website.
(Full disclosure: I work for the company that develops Node.js for Mobile Apps.)
You can use JXCore to run Node.js with Express on mobile devices with PhoneGap, here is a link of a tutorial and more details about JXCore: https://www.sitepoint.com/how-to-run-node-js-with-express-on-mobile-devices/
You can run Node on iOS and Android with LiquidCore.
LiquidCore enables Node.js virtual machines to run inside Android and iOS apps. It provides a complete runtime environment, including a virtual file system and native MySQL support.
LiquidCore is a full port of node 8.9+ and supports all the bells and whistles. On iOS, its magic comes from a translation layer called
Best way to run NodeJS (and other things like Python, gcc, etc) on Android is through Termux which gives you a full-on Linux terminal. I’m surprised nobody has put the link here yet. (no affilications with me)
It also gives you APIs to access GPS and send notifications which you can call through your NodeJS script.
I have used it to run various nodejs apps on my Android phone, including this one.