This is a basic Hello World web application.
- virtualenv
- Docker (Docker for Mac or Docker-CE/EE)
- dgoss - for container tests
- Run application acceptance tests.
docker run -v ${PWD}:/app -e PYTHONPATH=/app python:2.7 bash -c "pip install -r /app/requirements.txt -r /app/tests/requirements.txt && pytest /app/tests"
- Deactivate and delete virtualenv
deactivate
rm -rf venv
- Next, build a container image.
docker build -t hello_world_app:latest .
- Then, test the container image using dgoss:
dgoss run hello_world_app:latest
- Start the application:
docker run --rm -d -p 8080:8080 --name my_app hello_world_app:latest
-
Point your web browser to http://127.0.0.1:8080/. "hello world" should be returned.
-
To stop the container:
docker kill my_app
The endpoints below support the query parameters below. They can be used
uppercase
- Capitalizes the return string.reversed
-
-
Method: GET
Return Content: hello world
Success Status Code: 200
-
Method: GET
Return Content: hello
Success Status Code: 200
-
Method: GET
Return Content: world
Success Status Code: 200
To run tests,