Skip to content Skip to sidebar Skip to footer

Showing Command Line Output On A Html Page

I am building a web app which runs certain commands on the terminal and display the results back on web app. I am able to run commands using child_process.exec and fetch the result

Solution 1:

For a terminal/shell/console-like experience in a browser or web app, check out...

JS solutions, for interactivity

HTML/CSS-only solutions, for non-interactivity

To simulate a terminal, with no connectivity or interactivity:

Or perhaps start from scratch with a black background, white mono-space font and build it up from there...

CodePen

#container {
  background-color: #000000;
  width: 100%;
  height: 100%;
  max-width: 400px;
  max-height: 400px;
  padding: 3em;
}

#content {
  color: #ffffff;
  font-size: 16px;
  font-family: monospace;
}
<divid="container"><divid="content"><p>Hello world</p><p>Hello world</p><p>Hello world</p><p>Hello world</p></div></div>

Post a Comment for "Showing Command Line Output On A Html Page"