Backend
Initial setup
-
Prerequisites: Check here
-
Install Pipenv
MacOS:
$ brew install pipenv
pip
:$ pip install pipenv
-
Install the shit
$ pipenv install --dev
-
Get into the environment shell
$ pipenv shell
-
Make sure you've migrated the shit
$ python3 manage.py migrate
-
Run the shit
$ python3 manage.py runserver
Redis setup
This step is necessary to use web sockets. Instructions taken from here
-
Download build dependencies
$ sudo apt-get update $ sudo apt-get install build-essential tcl
-
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
-
Build and install redis
$ make $ sudo make install
-
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