Struggling with an unusual issue. I've been trying to troubleshoot it for the past 48 hours, but so far no luck. Can anyone provide some assistance?
commands.js
module.exports = function Say() {
var Web = require('../web/web.js');
if(Web.x === true){
console.log('Doneee');
}
}
web.js
app.post('/main', urlencodedParser, function(req, res){
var saycontent = req.body.say;
console.log(saycontent);
exports.x = true;
var Sayy = require('../modules/commands.js');
var say = new Sayy();
say.Say;
res.render('main', {qs: res.query});
});
app.listen(5000);
}
Any thoughts on why "Doneee" is not displaying in the console? Any ideas or suggestions are welcome.