ajax and flask To test the codes, run python app.py or gunicorn -w 4 -b 0.0.0.0:5000 app:app Then open http://127.0.0.1:5000 via a browser.