After following the following tutorial, I cannot get the Javascript file to pass events through to NodeJS properly:
dhtmlx.com/blog/using-dhtmlxsch … h-node-js/
After doing some basic debugging, it seems that the error (as far back as I can trace it) is here in the app.js file:
app.post('/data', function(req, res){
var data = req.body;
When I look into the “data” variable, it is always empty regardless of the event type (insert, delete, or update) and as such, the following lines end up pushing out a Javascript alert saying “Not supported operation undefined”. I believe that this means the Javascript code isn’t sending the data in the right format or is simply sending empty data.
So far, all I have been able to do is get NodeJS to populate my MongoDB with the test data and no user input from the HTML/Javascript webpage is allowed. Since this is the code provided as a demo, I thought maybe someone else has had the same issue. Any suggestions?