Initialize IONIC server.js 1 to run in "production"

1

SHOULD SERVER.JS BE INITIATED SO I PERFORM IT ON MY MOBILE PHONE?

How could I configure it to work this 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

    
asked by anonymous 20.03.2017 / 01:11

1 answer

2

Do the following:

  • In your package.json look for the scripts
  • Add this line (if substitute exists)

    scripts: {
        "start": "ionic serve && nodemon server.js"
        //Outros scripts aqui abaixo
    }
    

Then in the root of your project simply run npm start

    
20.03.2017 / 13:58