Skip to content

robertshand/python-hello-world

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Simple Web Server written in 'Python'

Displays

  • WELCOME MASSAGE
  • Hostname
  • $PID

To Run:

export WELCOME_MSG="Hello World"
python hello-world.py

To Test:

curl http://localhost:80
*** Python - Hello World ! ***
WELCOME_MSG : Hello World
Hostname is : <your-hostname>
Process ID  : 98

Docker

Can be used to create a docker image and run within a container

To Build

docker build -t robertshand/python-hello-world .

To Run

docker run -d -p 80:80 -e WELCOME_MSG="Hello World" robertshand/python-hello-world

To Test

curl http://$(docker-machine ip default):80

Result is

*** Python - Hello World ! ***
WELCOME_MSG : Hello World
Hostname is : 9ffe7e421652
Process ID  : 1%

About

Simple 'Hello World" Web Server written in Python

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •