Hi, I’m new to ionic, in fact I heard about it yesterday and I want to use it at work because i think it’s very cool to code once and run across all platforms.
The thing is I’m confused on how it works. I did a tutorial about ionic-react yesterday and I find it great but it did not show any server side code and that’s exactly what I’m planning to do.
In my use case I need my frontend to connect to a socket. Precisely, I have data in the cloud and i need to pull them over socket and show them at the frontend. For this I will need a server (probably node js) to pull the data over a socket and them show these data in the frontend.
Now this is confusing since the ionic app is started with the
command but node js server must also be started with the
command. Which one of them should run here?
Also how to deploy my app to ios or android if a node js is needed? should the entry point be ionic serve or npm start ? I assume the app will not work if the node js server is not running in the background, and how would it run on mobile!?
Should I maybe deploy the node js server in the cloud (for example in heroku) and then expose the IP adress, which I ll connect to in my frontend? or connect to the socket from my mobile? is that the right way to do it?
I’m very confused, I would appreciate it if someone can guide me on this.