I have an index.js
where I import a module:
const msg = require('../server/email/sendMail');
console.log(msg);
In my sendMail
file I have:
// sendMail.js
function main() {
return 'message'
}
module.exports = {main};
When I run the index.js file I get:
{ main: [Function: main] }
I expected the string message
to be shown in the log.