/food_order

Primary LanguagePythonMIT LicenseMIT

[![MIT License][license-shield]][license-url]


Food Order

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage

About The Project

This a playground project for async web architecture. Where services might be divided into multiple microservices general principles are simple.

Request -> Endpoint Handles the request and returns a promise -> At this point response is generated and send to user -> generated promise is actually a task id thats queued into rabbitmq for complex calculations -> after complex calculations handled asynchronously the result is saved to rabbitmq -> given any time user can query and ask for promise status

(back to top)

Built With

(back to top)

Getting Started

Prerequisites

Installation

  1. Clone the repo
    git clone https://github.com/your_username_/Project-Name.git
    cd Project-Name
  2. Run to get it started.
    docker-compose build
    docker-compose up -d
  3. Prepare db migrations
    docker-compose exec web flask db init
    docker-compose exec web flask db upgrade
  4. populate db with some data
    docker-compose exec web python seed.py
  5. now you should be able to test

Extra:

for shell access use:

  docker-compose exec web flask shell

after model changes use:

  docker-compose exec web flask db migrate -m "migration commit message"

Testing:

docker-compose exec web python -m unittest

(back to top)

Docs

Swagger Documentation

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)