VACUA PROJECT BACKEND

About


Vacua Backend provides all the API calls and queries of this project.

Installation

  1. Fork, clone the repository and change directory into it.
     # Cloning the repository
     git clone https://github.com/<username>/Vacua-backend
    
    # Change directory
    cd Vacua-backend
  2. Setup a new postgres database Assuming postgresql is install in the computer follow what's next or get to here for linux or here for windows.
    •  # accessing the postgres CLI
       sudo -u postgres psql
    • -- Create a database
      CREATE DATABASE vacua_db;
      
      -- create a new user with the details below
      CREATE USER admin WITH ENCRYPTED PASSWORD 'password';
      -- Grant all priviledges
      GRANT ALL PRIVILEGES ON DATABASE vacua_db TO yokwejuste;
      
  3. Create, activate a virtual environement in the project
    python -m venv venv
    source venv/bin/activate
  4. Install dependencies from the pypi
    pip intall -r requirements.txt
  5. Do some data migration and predata seeding to the database
    python manage.py migrate && python manage.py post_data --mode clear
  6. Run the project and view the documentation at the default port: http://127.0.0.1:8000