Strange question, but currently I have a script that I run from the terminal which requires a parameter. Normally I will run this by doing node script.js param, but now I want to run this script with the parameter from inside a JS file when the Express server loads.
The parameter is taken in and defined in the file like this:
var param = process.argv[process.argv.length - 1];
What is the best practice for making this file accessible elsewhere in my Node app and running it?
require("script.js")file from other file?