javascript - Speed up server response for POSTing JSON to an Express.js server -


i trying post base64 string canvas express.js server, console log of post/ takes forever , never logs json content posted.

this use on client:

saveimage: function(e) {     var canvas = document.queryselector('#canvaselement');     var base64 = canvas.todataurl();     $.ajax({         type: 'post',         url: '/',         contenttype: 'application/json',         data: base64,         success: function(e){             console.log('success', e)         }     }); } 

...then on server:

var express = require('express'), app = express();  app.use(bodyparser.json());  app.post('/', function (request, response) {   console.log(request.body); }); 


Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -