juxd / a3-backend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Backend

Initial setup

  1. Prerequisites: Check here

  2. Install Pipenv

    MacOS:

    $ brew install pipenv

    pip:

    $ pip install pipenv
  3. Install the shit

    $ pipenv install --dev
  4. Get into the environment shell

    $ pipenv shell
  5. Make sure you've migrated the shit

    $ python3 manage.py migrate
  6. Run the shit

    $ python3 manage.py runserver

Redis setup

This step is necessary to use web sockets. Instructions taken from here

  1. Download build dependencies

    $ sudo apt-get update
    $ sudo apt-get install build-essential tcl
  2. Download and extract source code
    Since we won’t need to keep the source code that we’ll compile long term (we can always re-download it), we will build in the /tmp directory. Let’s move there now:

    $ cd /tmp

    Now, download the latest stable version of Redis. This is always available at a stable download URL:

    $ cd curl -O http://download.redis.io/redis-stable.tar.gz

    Unpack the tarball by typing:

    $ tar xzvf redis-stable.tar.gz

    Move into the Redis source directory structure that was just extracted:

    $ cd redis-stable
  3. Build and install redis

    $ make
    $ sudo make install
  4. Launch redis server. Presumedly, this is the step that will always have to be run when restarting the environment.

    $ redis-cli

    Make sure that the server is opened at port 6379. If it's not, try:

    $ redis-server --port 6379

About


Languages

Language:Python 100.0%