javascript - Print received data from client in NodeJS server -
i have simple html file containing piece of javascript: <script type="text/javascript"> $.ajax({ url: 'http://192.168.x.x:8080', data: '{"data": "1"}', datatype: "jsonp", cache: false, timeout: 5000, success: function(data) { var ret = jquery.parsejson(data); }, error: function (xhr, status, error) { console.log('error: ' + error.message); document.getelementbyid("error").innerhtml = 'error: ' + error.message; } }); </script> i want nodejs server print data received (there: number 1°). here nodejs code: var http = require('http'); var s = http.createserver(); s.on('request', function(request, response) { response.writehead(200); console.log('a: '...