Having strange trouble. I am trying to fix that for 2 days, but no success. Can you help me?
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);
}
Why doesnt it show in console "Doneee"? Do you have any ideas?
Aucun commentaire:
Enregistrer un commentaire