DOCKER WITH JAVASCRIPT

Tanmay
Jun 25, 2021

Step1 : create python file containing our backend code

§ import modules of cgi and subprocess

§ From cgi module import FieldStorage function.

§ Taking input in X : variable_name.getvalue in input format “x”

§ For final output We have to use subprocess module i.e getoutput()

§ Print the value which we get from getoutput()

Step 2: Create html file containing Javsacript and Html body

§ Put Function containing which handles XMLHttp request

§ Create varible xhr containing Ip address of backend code server and provide server.py file

§ Get the input from getElementby Id method.

§ Create body tag containing front end UI

§ Create input field and button to run command and hit output.

--

--