Skip to content

gctrevino/flask-succotash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flask-succotash

This is a Simple Flask app

Requirements

  1. Build a simple Flask application that accepts a JSON list of objects (developer's choice as to what the data would be), sorts it, and returns the results.

  2. Put the Flask application into a Docker container and expose whatever port number to the host.

  3. Provide the Dockerfile, source code, and a Makefile or other script that we could use to build the Docker container on our computers and try it out.

Disclaimer: The following has been tested on an Ubuntu 18.04 machine

How to generate container

To generate the flask-app container run:

docker build -t flask-app:latest .

How to run the container

To start the container in foreground mode run:

docker run -it -p 5000:5000 --rm flask-app

To start the container in background mode run:

docker run -d -p 5000:5000 --rm flask-app

How to run the tests

To run the small test set included with this project:

python3 tests.py

How to enter the container

I don't see why, but if you want to get into the container, run the following:

docker run -it -p 5000:5000 --entrypoint /bin/bash --rm flask-app

ToDo

App

  • Handle error when something other than numbers are provided
  • Handle something other than json
  • Improve sorting method
  • ...

Tests

  • Add NaN tests
  • Add garbage tests
  • Add bigger datasets and see the app crumble
  • ...

Template

  • Add a UI for testing

Tools

  • PyCharm
  • VSCode
  • GitHub

OS

  • Windows 10
  • Ubuntu 18.04 (VM)

About

Simple Flask app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published