Skip to content

eaculb/xword-backend

Repository files navigation

About

⚠️ This project is currently in progress! It is the backend for a full-stack crossword-builder app.

Setup

  1. Install pyenv and pyenv-virtualenv
  1. Create a virtual env and record it in the repo's python-version
pyenv virtualenv 3.8.0 eaculb-xword-backend
echo eaculb-xword-backend > .python-version
  1. Compile and install requirements
pip-compile requirements-dev.in
pip-compile requirements.in
pip install -r requirements-dev.txt

Testing

  1. Install prerequisites for PostgreSQL
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python-openssl git
  1. Install PostgreSQL:

note: if running Ubuntu 16.04 you will need to replace postgresql-server-dev-12 with postgresql-server-dev-9.5

sudo apt update
sudo apt install postgresql postgresql-contrib libpq-dev postgresql-server-dev-12
  1. Create a db role with your username:
  sudo -u postgres createuser --interactive -P
  1. At some point you will need to create a db password; record this or export in your ~/.bashrc

  2. Create a test db and export its url; I recommend creating a helper bash function to reset the test db and export its name

createdb xword_test
export DATABASE_URL=postgresql://localhost/xword_test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published