Build a simple server-side app with Flask that generate random values of String, Integer, Float and Alphanumeric
and save it to a file with maxium size of 2MB. Allow to download such file from a web client written in React. Calculate how many values of each type generated from such file.
The most simple way is to run with docker, which has everything bundled and ready to use
$ docker build -t <image-tag> .
$ docker run -p 3000:3000 --name <container-name> <image-tag>:latest
After the application has started, open your web-browser and go to http://localhost:3000
-
Pipenv, Python3.8 are required
-
Install dependencies and run it
$ cd backend
$ pipenv install --dev --pre
$ pipenv run dev
- Run test with
$ pipenv run test
- Node 14 is required
- Prepare a
.env
file
# Not neccessary when running with flask-backend in development mode
REACT_APP_SERVER_URL=http://localhost:3000
# Enable the following env-var when running with flask-backend in development mode
# REACT_APP_API_URL=http://localhost:5000
- Run or build with npm
$ npm start
$ npm run build