Download and install Redis server for your operating system: Linux, MacOS, or Windows
Start and verify the Redis server:
# Mac
redis-server /usr/local/etc/redis.conf
# Linux
redis-server
# Windows - Navigate to the Redis folder, and run
redis-server.exe
redis-cli.exe
# Ping your Redis server to verify if it is running. It will return "PONG"
redis-cli pingIt's your choice to work in a virtual environment. For this, you must have the virtualenv installed. Then, create and activate a virtual environment:
# Navigate to the azure-vote/ folder
cd azure-vote/# Mac/Linux
python3 -m venv .venv
source .venv/bin/activate
# Windows on Powershell or GitBash terminal
py -3 -m venv .venv
.venv\Scripts\activateInstall dependencies from requirements.txt:
# Run this command from the parent directory where you have the requirements.txt file
pip install -r requirements.txt# Navigate to the azure-vote/ folder if not already
cd azure-vote/
python main.pyNOTE: The statement
app.run()in/azure-vote/main.pyfile is currently set for your local environment. Replace it with the following statement when deploying the application to a VM Scale Set:app.run(host='0.0.0.0', threaded=True, debug=True)