- Ensure you have
python3
version >=3.8 installed. To find out about this, Open a command prompt or terminal and typepython3 -v
. - You have a text editor (preferably VScode) installed on your computer
- You have mysql set up as it is what we will be using
- Clone repository
git clone [email protected]:hngx-org/Mirage-food-backend.git
or
git clone https://github.com/hngx-org/Mirage-food-backend.git
- Checkout to a branch using the following format ft-(e.g git checkout -b ft-getallusers)
NOTE: All Pull requests should be made toward the development branch.
Navigate into the folder you cloned the project
python3 -m venv virtual
source virtual/bin/activate
Ensure that this file is hidden inside the gitignore
touch .env
Ensure that this file is hidden inside the gitignore
Sample dotenv file will have the following structure:
SECRET_KEY='secret'
DB_NAME='mydb'
DB_USER='user'
DB_PASSWORD='pass123'
Configure your project secrets and credentials in this file
pip3 install -r requirements.txt
or
python3 -m pip install -r requirements.txt
SetUp your Database and add the Db name, password and user to your dotenv file Now Migrate
python3 manage.py migrate
python3 manage.py runserver
Open the application on your browser 127.0.0.1:8000
.
Ensure to follow these steps when committing:
- git add .
- git commit -m <message here>
- git pull origin development
- git push origin
- Go to github
- Open a new Pull Request to the Development Branch and not the Main Branch.