Initialize server automatically on IONIC 1

To run my app I need to run the node server.js or nodemon server.js.

I would like the nodemon server.js to run automatically as soon as I ran the ionic emulator ios or ionic emuluate android

How could I configure it to work that way?

This is because I have a service in mongo, and it needs to be execute the connection with mongo that is implemented in server.js