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.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet