Flask Applications
- Install the dependencies.
sudo apt-get install libmysqlclient-dev -y sudo apt-get install python-dev -y pip install --ignore-installed -r requirements.txt
- Set up MySQL.
sudo apt-get install mysql-server (Enter the password when prompted)
- Check the status of the service. It should be running.
service mysql status
- Log in to MySQL and create a database named deployment.
mysql -u root -p"" create database demo;
-
Create Virtual Env if it is not created virtualenv venv
-
activate Virtual Env source venv/bin/activate
-
Install the requirement.txt pip install --ignore-installed -r requirements.txt
-
Export environment variables.
export DB_HOST="127.0.0.1" export DB_USER="root" export DB_PASS=""
- Set up database.
python db.py db init python db.py db migrate python db.py db upgrade python db.py seed
- Run the application.
python run.py
- Go to the postman and test signup api which is given for test URL : http://localhost/ums/api/v1/users POST : { "email":"sagarsalvi2011@gmail.com", "password":"Opcito@123"
} Response : { "data": "", "message": "Your account has been successfully registered" }