There is a test application written in Node.JS
var express = require('express'); var app = express(); app.post('/', function (req, res) { getClick(); }); app.listen(3000); function getClick() { console.log('Клик получен'); } As you can see, it catches a click from the site and notifies it in the console. Click caught like this
$('#button').click(function() { event.preventDefault(); $.ajax({ type: 'POST', url: 'http://localhost:3000/' }); }); The question is as follows. How to send a response about getting a click not to the console but back to the page from which the click was sent?