Backend provides a simple API for managing tree-based comments.
-
Clone repo
sudo apt update sudo apt install git git clone https://github.com/vyacheslav-bezborodov/closure-table cd closure-table/
-
Set up Python
sudo apt update sudo apt install python3-pip sudo -H pip3 install pipenv pipenv install --dev pipenv shell
-
Set up PostgreSQL
sudo apt update sudo apt install postgresql # create user and db sudo su postgres createuser —pwprompt closureuser # and type closurepass createdb —owner=closureuser closuredb exit # apply migrations python src/closure_table/auth/db/manage.py version_control python src/closure_table/auth/db/manage.py upgrade python src/closure_table/comments/db/manage.py version_control python src/closure_table/comments/db/manage.py upgrade
Activate the shell and run the script.
pipenv shell
python runserver.py
Then open http://localhost:8080/api/doc in your favourite browser.
Use admin/admin as a superuser email and password to sign in.