Execute command and show result in web page

Hi everyone,

I have two question

1- I want to execute command in shell and after execution result show in a web server. (kind of making UI )
e.g.

in shell

root ~: show list

item1
item2
item(n)

in web server

in a page draw a table and show those items in it

no    |   name
----------------

  1    |   item1
  2    |   item2
 (n)   |   item(n)

2- do you have any suggestion for a light web server that run without dependency and does not need to installation?

Thanks,

node.js is popular when programming in Javascript.

Node.js

Or, you can use something like Visual Studio Code and install a lightweight web server plugin (which also uses node.js).

Visual Studio Code - Code Editing. Redefined