Skip to content

antoninbouchal/express-console

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

express-console

Simple package allowing to show console output to web browser

Instalation

Via npm:

npm install express-console

Via github:

npm install "git+https://github.com/Scorpio1337/express-console.git"

Usage

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();

About

Show your console outputs to html page.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published