Skip to content

cs3216-2021-a3-group12/slotify-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Slotify Backend

Home to the REST API server for Slotify.

Setup Guide

  1. git clone the repository (either via GitHub desktop or CLI)
  • git clone <Project A> # Cloning project repository
  1. change to project directory
  • cd <Project A> # Enter to project directory
  1. create virtual environment
  • python -m venv venv # If not created, creating virtualenv
  • NOTE: for Mac, you may need to specify python3 instead of python
  1. activate virtual environment
  • Windows: venv\Scripts\activate.bat
  • Mac: source ./venv/bin/activate # Activating virtualenv
  • (Better) using VSCode, select the python interpreter within the venv folder and the above is done automatically
  • Note: When the virtual environment is activated (when your prompt has (venv) preceding it), use pip instead of pip3, even if you are using Python 3. The virtual environment’s copy of the tool is always named pip, regardless of the Python version
  1. install dependencies
  • pip install -r requirements.txt # Installing dependencies
  1. retrieve .env file from google drive
  1. setup database
  • according to the postgresql detail in .env file, create the database locally and the relevant database user.
  1. apply migration
  • python manage.py migrate

Update dependencies

  • to add a new package, go to the root directory and
    • pip install packageName # venv should be active
    • pip freeze > requirements.txt # update requirements.txt

Running the development server

Start the django development server by running the following in command-line (make sure that you are in the slotify directory with manage.py):

  • cd slotify
  • python manage.py runserver

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages