Simple package allowing to show console output to web browser
Via npm:
npm install express-console
Via github:
npm install "git+https://github.com/Scorpio1337/express-console.git"
Here is simple code for example.
Just add this code to top of your script to request part:
// Rewrite default console with console.
// Run express app on port 8000 (default is 8080)
console = require('express-console')(8000);
// Go to http://localhost:8000 (or other port)
function printRandomNumber() {
var inter = Math.ceil(Math.random() * 3000);
console.log('Print random number ' + inter);
setTimeout(printRandomNumber, inter);
}
printRandomNumber();