shahargalon / book-store

0 stars 0 forks source link

Book Store

GitHub Workflow Status

The backend for an awesome book store app!

Pre Requirements

  1. Python.
  2. Pipenv.

Development

  1. Create a virtual environment and activate it pipenv shell.
  2. Install all dependencies pipenv install.
  3. Run the server with python src/server.py.
  4. Open an HTTP client at hit http://localhost:8000.

Production

In production don't use the sanic server, use something like gunicorn (read this). Use it like so:

$ gunicorn server:app --bind 0.0.0.0:8000 --worker-class sanic.worker.GunicornWorker

Tests

To run the linter

$ pycodestyle .

To run the tests

$ python -m unittest