Skip to content

slavabzb/closure-table

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Closure table using Asyncio + PostgreSQL

Backend provides a simple API for managing tree-based comments.

Deploy (Ubuntu 16.04 LTS)

  1. Clone repo

    sudo apt update
    sudo apt install git
    git clone https://github.com/vyacheslav-bezborodov/closure-table
    cd closure-table/
  2. Set up Python

    sudo apt update
    sudo apt install python3-pip
    sudo -H pip3 install pipenv
    pipenv install --dev
    pipenv shell
  3. 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

Run server

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.

Releases

No releases published

Packages

No packages published

Languages