To call Node.js "require" function and parameters, we export a function.
For instance, we write
module.exports = (options) => {
const app = options.app;
const param2 = options.param2;
};
in lib.js to export a function.
Then we write
require("lib.js")({ app, param2 });
to require the lib.js file and call the function that’s imported.