If I have these 2 files(just an example) in my project, how do I require hello.js without having it run in bye.js at the require line, but also be able to run hello.js from the command line? If I remove run(); from hello.js I won't be able to run it from the command line anymore.
hello.js
function run() {
console.log("hello");
}
run();
module.exports = run;
bye.js
const hello = require('./hello.js');
(async () => {
await hello.run();
})