A Fibonacci RESTful web service.
- Python 2.7.5+
- Bottle 0.12.8
- WebTest 2.0.18
$ pip install bottle==0.12.8
$ pip install WebTest==2.0.18
$ python fibonacci_unit_test.py
$ python fibonacci_service_unit_test.py
$ python fibonacci.py
$ python fibonacci_service.py
Assuming your local development is accessible via http://localhost:8080/
you can consume the web service by sending an HTTP GET request like the one below
(where n is zero or a positive integer):
http://localhost:8080/fibsvc/n
A Dockerfile has been included in case you would like to deploy to a Docker container.
$ docker build -t fibsvc .
docker run -d -p 8080:8080 fibsvc
You can verify that the server is running and listening on port 8080 by running:
docker ps
Send an HTTP GET request like the one below (where n is zero or a positive integer):
http://localhost:8080/fibsvc/n