How to pass file file path as argument to the script?
04:46 22 Feb 2022

I want to send the data from package.json:

 "scripts": {
    "start": "node list.js",
}

list.js:

const serviceAccount = require(path);

When I execute command npm start ./style.json, I wanted to pass the path to to path variable in list.js.

How can I do that?

node.js npm path require package.json