How to ship or build the socket io chat app for device

I have already finishing coding and my chat app works fine and looks good. I have a socket io chat-server inside ionic project folder. To make my chat app work I need to start the chat-server with node index.js and everything works fine. But now I am stuck in a point where I don’t know how to build this two things in one. I mean ionic app and socket io chat-server and how would I auto start the node index.js. I am very confuse at this point a help would be much appreciated in how to ship this two things for device ready. I hope I have explained clearly…

I would say at this point in time you need to conclude that trying to ship nodejs server capabilities in a ionic app is not the best strategy.

You could go for own socket implementation using plugins, use the http server plugin or something else

Possibly finding yourself recoding a chunk