Skip to content

Latest commit

 

History

History
107 lines (67 loc) · 2.4 KB

README.md

File metadata and controls

107 lines (67 loc) · 2.4 KB

CircleCI

Mangia Club

This is the repository of the API of the Mangia Club App

Getting Started

Prerequisites

Running the application in developer mode

First clone the repository:

$ git clone https://github.com/dgroh/mangia.club.git

Open a command line from the root folder of the project and create a python virtual environment.

From the root folder of the project inside the activated virtual environment create the following environment variables:

On Windows

set FLASK_APP=run.py
set FLASK_ENV=development

On Linux/Mac

set FLASK_APP=run.py
set FLASK_ENV=development

Also from the command line, install the project requirements:

$ pip install -r requirements.txt

Starting MongoDB and Redis instances

The app uses MongoDB as default database and Redis for caching. To run them with the application run:

$ docker run --rm --name mangia-club-mongo -d -it -p 27017:27017 mongo:latest
$ docker run --rm --name mangia-club-redis -d -it -p 6379:6379 redis:latest

To use the Mongo-Cli to access the MongoDB instance of the application, run:

$ docker exec -it mangia-club-mongo mongo

To use the Redis-Cli to access the Redis instance of the application, run:

$ docker exec -it mangia-club-redis redis-cli

To start the API runs:

$ flask run

This will start the API on http://localhost:5000


To test the API you can use Postman

Documentation

For generating the documentation based on the docstrings we use pdoc

If a docstring has been changed, run:

$ pdoc api --html -o docs --force

This will update the current index.html

Built With

License

© Copyright 2020, Daniel Groh. All Rights Reserved