in the following code, app1.js sends information on localhost port 3000
//app1.js
var http = require('http');
const valueToTransfert = 'test';
var server = http.createServer(function(req, res) {
res.end('valueToTransfert');
});
server.listen(3000);
I want to make a second program app2.js that will run simultaneously and read data sent by app1.js on localhost:3000.
How can I do that ?
Thank you for your help