I want to make a script in package.json file where I can run a file which is not present in the same directory as the package.json file but it is present in parent folder of package.json file.
I want to do it like:
"scripts": {
"server": "nodemon ../../ServerStarter.js",
}
I want to make a script in package.json file where I can run a file which is not present in the same directory as the package.json file but it is present in parent folder of package.json file.
I want to do it like:
"scripts": {
"server": "nodemon ../../ServerStarter.js",
}
Here I want to run the ServerStarter.js
file but I don't know how to put the file path in there. Please Help.
-
If it's in the parent folder, the path should be
../
, not../../
. If you do../../
, it references the parent folder's parent folder. – cbr Commented Mar 20, 2021 at 14:05 - Yeah, sorry I had just put an extra pair of ../