Case Study
https://github.com/ertongcan/storyly_case_study.git
cd storyly_case_study
COPY .env.sample AS .envpython3 -m venv venv
source venv/bin/activate OR \venv\Scripts\activate
pip install -r requirements.txtFollow these steps run models migration, at the end of below commands, models in the app will be created on specified db(from .env file)
set FLASK_APP=api/__init__.py
flask db init
flask db migrate
flask db upgradeThen
flask runpython tests.pyGET '/stories/<string:token>' - get stories by given app token
GET '/stories_enhanced/<string:token>' - get stories by app token (peformance optimized version)
POST '/event/<string:token>' - save user events
GET '/event/dau/<string:token>/<string:event_date>' - get daily active users
Tests are taken place using apache ab testing tool by following command;
ab -k -n 100 -c 10 <URL_TO_TEST>