From 3497d2f4a9104af7c55a4aabc9834c5cbd644ea8 Mon Sep 17 00:00:00 2001 From: bobbyvish Date: Wed, 12 Jun 2024 12:26:17 +0530 Subject: [PATCH] Added readme file --- README.md | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..09df522 --- /dev/null +++ b/README.md @@ -0,0 +1,77 @@ +# Installation Guide for Digest Backend + +Follow these steps to set up the Digest Backend project on your local machine. + +## Cloning the Repository + +1. Clone the repository: + ```sh + $ git clone https://github.com/WDI-Ideas/digest_backend.git + $ cd digest_backend + ``` + +## Setting Up the Environment + +2. Install `virtualenv` if you haven't already: + ```sh + $ pip install virtualenv + ``` + +3. Create a virtual environment: + ```sh + $ virtualenv venv + ``` + +4. Activate the virtual environment: + + **Windows:** + ```sh + venv\Scripts\activate + ``` + + **Mac/Linux:** + ```sh + source venv/bin/activate + ``` + +## Installing Dependencies + +5. Install the required dependencies using pip: + ```sh + $ pip install -r requirements.txt + ``` + +## Configuring the Environment Variables + +6. Copy and rename the env.example file to .env and set all the required variables. Ensure there are no spaces around the =: + ```sh + $ cp env.example .env + ``` + +## Migrating the Database + +7. Run the following command to create the database tables: + ```sh + $ python manage.py migrate + ``` + +## Pre-Populating the Database + +8. Run the following command to pre-populate the database with custom command: + ```sh + $ python manage.py load_iam_fixture + ``` + +## Running the Server + +9. Run the following command to start the server: + ```sh + $ python manage.py runserver + ``` + +Now, your server should be up and running. Access it in your browser at http://127.0.0.1:8000/. + +## Note : +- Make sure you have Python and pip installed on your system. +- If you encounter any issues, ensure that all dependencies are properly installed and the environment variables are correctly configured. +- Always activate the virtual environment before running any Python or Django commands. -- 2.34.1