Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
129
rated 0 times [  130] [ 1]  / answers: 1 / hits: 19355  / 6 Years ago, wed, december 19, 2018, 12:00:00

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 results the problem i'm facing is while displaying it on an html page.



I want something like this:
enter



Is there any way to show the command line output like this ? Any leads would do. Thank you.


More From » html

 Answers
29

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;
}

<div id=container>
<div id=content>
<p>Hello world</p>
<p>Hello world</p>
<p>Hello world</p>
<p>Hello world</p>
</div>
</div>




[#52895] Thursday, December 13, 2018, 6 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
randall

Total Points: 492
Total Questions: 99
Total Answers: 103

Location: Solomon Islands
Member since Fri, Oct 8, 2021
3 Years ago
;