I am starting mongodb server using cmd with the following command:
"C:/Program Files/MongoDB/Server/3.6/bin/mongod.exe"
It starts the mongodb server perfectly.
Now I need to do it via npm script. Below is my package.json file:
package.json:
"scripts": {
"ng": "ng",
"prestart": "start /b \"C:/Program Files/MongoDB/Server/3.6/bin/mongod.exe\"",
"start": "ng serve | node server.js",
"build": "ng build --prod",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
}
Now when I hit npm start, it doesn't starts the mongodb server.
I also included the path "C:/Program Files/MongoDB/Server/3.6/bin/mongod.exe" in environment variables (both user&system).
Can anyone help me to know where I was wrong?