Skip to content

dgroh/MangiaClubPy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A REST API with Python and Flask

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages