Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 844 Bytes

README.md

File metadata and controls

44 lines (30 loc) · 844 Bytes

FizzBuzz webapp

Small web application that wraps the famous FizzBuzz problem into a nice REST API.

Requirements

  • Python 3.7

Installation

pip install -r requirements.txt

Run the app

Here is how to run the app in both development and production mode.

Development

export FLASK_APP=src/app.py
export FLASK_ENV=development
flask run

The development app should be available on port 5000: curl localhost:5000/api/fizzbuzz/13

Production

DO NOT ACTUALLY USE THIS IN PRODUCTION, THIS IS SIMPLIFIED FOR DEMONSTRATION PURPOSES

export FLASK_APP=src/app.py
export FLASK_ENV=production
flask run

The development app should be available on port 5000: curl localhost:5000/api/fizzbuzz/13

Unit tests

To run the small test suite, use:

python -m unittest tests/test_fizzbuzz.py -v