Start backend server on app start


I have an electron (quasar (vue-based) front-end, expressJS backend) desktop app.
When building the app I face the problem that I still have to call my backend server from bash with cd-folder and “nodemon server.js”.

Is there a way to start the server when the app is opened with some code in package.json or electron-main.js?

I tried in package-json - scripts - “start”: “node server.js”, but it didn’t work.
Could it be that I have to add something so it knows where to look for the server.js file?

I’d appreciate any help!

Is electron even packaging my backend server?