Skip to content

Full stack django and react chat app. this represents the api backend portion of the app

Notifications You must be signed in to change notification settings

raph941/chatApp-API

Repository files navigation

Status Python Version Django Version Made with React

Branch CircleCI
master raph941

Getting Started

Follow these instructions, to get a copy and run on your PC

Prerequisites

  1. A Computer (😀😁)
  2. Virtual Environment Installed (recommended not compulsory)
  3. Pyhthon 3.8 installed globaly or within the VirtualEnv

Environmental Variables

Name Required Value
SECRET_KEY ✔️ String, standard Django setting
ALLOWED_HOSTS ✔️ localhost
DEBUG ✔️ Boolean, standard Django setting
DATABASE_URL standard Django setting
SQL_ENGINE ✔️ standard Django setting
SQL_DATABASE ✔️ standard Django setting
SQL_USER ✔️ standard Django setting
SQL_PASSWORD ✔️ standard Django setting
SQL_HOST ✔️ standard Django setting
REDIS_URL ✔️ standard Django setting

Frontend

Procedures

  1. Clone this repository: https://github.com/raph941/chatApp-API.git

  2. Setup pipenv and Python dependencies:

    pip install --user pipenv
    pipenv --python 3.6
    pipenv shell
    

    After successful setup, a prefix (env_name) should appear on the left of your terminal.

  3. Install Project Dependencies

    pipenv install (if you are using pipenv)
    or
    pip install -r requirements.txt
    
  4. Create the environment file .env on the root directory Use this as an example (do not copy😀):

    SECRET_KEY=choose-a-secreat-key
    DEBUG=True
    ALLOWED_HOSTS = *
    SQL_ENGINE=django.db.backends.postgresql
    SQL_DATABASE=sample-db
    SQL_USER=db-user
    SQL_PASSWORD=db-password
    SQL_HOST=your-db-host-name
    SQL_PORT=5432
    REDIS_URL = 'redis://localhost:6379'
    DATABASE_URL = 'your-database-url-here'
    
  5. Create Migrations: this sets up your database with all the necessary tables needed for the app to run

    python manage.py makemigrations
    python manage.py migrate
    
  6. Run the app

    python manage.py runserver
    

About

Full stack django and react chat app. this represents the api backend portion of the app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published