| Branch | CircleCI |
|---|---|
master |
Follow these instructions, to get a copy and run on your PC
- A Computer (😀😁)
- Virtual Environment Installed (recommended not compulsory)
- Pyhthon 3.8 installed globaly or within the VirtualEnv
| 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 |
- Node.js
- yarn
- Repo: Click here
-
Clone this repository:
https://github.com/raph941/chatApp-API.git -
Setup
pipenvand Python dependencies:pip install --user pipenv pipenv --python 3.6 pipenv shellAfter successful setup, a prefix
(env_name)should appear on the left of your terminal. -
Install Project Dependencies
pipenv install (if you are using pipenv) or pip install -r requirements.txt -
Create the environment file
.envon 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' -
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 -
Run the app
python manage.py runserver