How node writes data interfaces is what ajax uses.

  node.js, question

I just learned node and wrote a blog with this tutorial, but there was no ajax in the whole process, only a little bit of routing control, and I don’t know how to write some data interfaces. Ask for the tutorial.

You certainly know about routing and so on, and you may be able to do it this way:

oButton.onclick = function() {
 ajax({
 method : 'post',
 url : 'isuser',
 data : sName,
 success : function () {
 console.log('useable name');
 },
 async : false
 });
 bracket
 app.post('/isuser', function(req, res) {
 /*var username = req.body.username;
 I copied my own code, regardless of this code.
 if(status == 'OK'){
 res.send(200);
 }else{
 res.send(404);
 bracket
 });  *///Write your logic here
 });

AttachedExpress API