I have the following code:
app.get('/scr', function(req, res) {
var command = spawn(scripts + "/script.sh");
command.stdout.on('data', function (data) {
res.send(data);
});
});
The script outputs Hello World!. I would like to have this output on my browser when going to http://localhost:XXXX/scr. However, this wants me to download a file with Hello World! inside. How can I obtain that output on my browser?