Step 1: Fork the Repository
Go to the Keriderya API Repository.
Click the "Fork" button on the top right corner. This will create a copy of the repository under your GitHub account.
Link:https://github.com/Xavierbaliw/keriderya-api
Step 2: Set Up a PythonAnywhere Account
- Go to PythonAnywhere and create an account.
Step 3: Open Bash Console
Log in to your PythonAnywhere account.
Navigate to the Consoles tab and add a new Bash console.
Step 4: Clone Your Forked Repository
In the Bash console, clone your repository using the following command
Step 5: Set Up a Database in MySQL Console
Go to the Databases tab.
Create a new MySQL database.
Step 6: Create a Virtual Environment
In the Bash console, navigate to your project directory and create a virtual environment:
Step 7: Activate the Virtual Environment
Step 8: Configure Environment Variables
Create a config.py
file or configure your environment variables as needed.
Step 9: Edit config.py
Step 10: Run Database Migrations
python -m flask db upgrade
Step 11: Check MySQL Tables
You can check your MySQL tables using the MySQL Console to confirm successful migrations.
Step 12: Go to Web Tab
Navigate to the Web tab on PythonAnywhere.
Click on "Add a new web app"
Step 13: Create New Web App
Choose Flask.
Select Python 3.10.
-
Step 14: Path to Virtual Environment
In the web app settings, set the path to your virtual environment
Step 15: Edit
wsgi.py
Edit the
wsgi.py
file to include your application:Step 16: Reload Your Web App
Go back to the Web tab and click on the Reload button.
Step 17: Testing with Postman
Use Postman to test your API endpoints.
Step 18: Add Dummy Data
You can add dummy data to your database using SQL commands or a data seeding method defined in your application.
-