Skip to content

renehdz/fibsvc

Repository files navigation

fibsvc

A Fibonacci RESTful web service.

Requirements

  • Python 2.7.5+
  • Bottle 0.12.8
  • WebTest 2.0.18

Install requirements

$ pip install bottle==0.12.8
$ pip install WebTest==2.0.18

Run logic unit test

$ python fibonacci_unit_test.py

Run web service unit test

$ python fibonacci_service_unit_test.py

Run console application

$ python fibonacci.py

Run web service

$ python fibonacci_service.py

Using fibsvc

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

Docker Instructions

A Dockerfile has been included in case you would like to deploy to a Docker container.

Build the image

$ docker build -t fibsvc .

Run the container

docker run -d -p 8080:8080 fibsvc

Verify the server is running (optional)

You can verify that the server is running and listening on port 8080 by running:

docker ps

Using fibsvc inside Docker container

Send an HTTP GET request like the one below (where n is zero or a positive integer):

http://localhost:8080/fibsvc/n

About

A Fibonacci RESTful web service.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages