Define two custom scripts - task1 runs the file script1.js and task2 runs the file script2.js code example
Example: custom scripts in package.json
"scripts": {
"homedata": "node export.js homedata",
},
//In the terminal type
npm run homedata