Working repo for learning Flask.
- export FLASK_APP=<app-name/pythonscript>
- flask run or flask run --port 50001
flaskcommand will look for .flaskenv files
- git init
- git remote add origin [repo-url]
- git remote -v
- git status
- auth using PAT
- Create the model class in app/models.py.
- flask db migrate -m ""
- flask db upgrade
docker run --name elasticsearch -d --rm -p 9200:9200
--memory="2GB"
-e discovery.type=single-node -e xpack.security.enabled=false
-t docker.elastic.co/elasticsearch/elasticsearch:8.15.3
- DB browser for SQLlite: Perfect for loading .db files and run query.
- It is always best to move the application logic away from view functions and into models or other auxiliary classes or modules, because as you will see later in this chapter, that makes unit testing much easier. For eg: Functionality to follow and unfollow is writted in models.py
- User password reset via Email is not tested yet.
- To docker persmission issue run
sudo chmod 666 /var/run/docker.sock
Things I need to fix.
- Translation is not working. Haven't setup the Microsoft API under free tier.
- Elasticsearch search option is giving empty result. Possible issue with the Elastic version