Skip to content

Backend of Djelli's homeproject, creating a mobile website showing vegan and vegetarian recipes

Notifications You must be signed in to change notification settings

missEnergy/veganwinners-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Veganwinners backend

Prerequisites

First, create a file config.py in 'app/' with content:

DATABASE_URI = 'mysql://<user>:<password>@localhost:<port>/<database-name>'
CLARIFAI_KEY = '<the key>'
APPROVE_KEY = '<the approve password>'
API_KEY = '<the cloudinary api key>'
API_SECRET = '<the cloudinary api secret>'
CLOUD_NAME = '<the cloudinary name>'
UPLOAD_PRESET = '<the upload preset>'

How to run this API locally

First, make sure you have a database running on mysql for the user and password specified.

requirements

git
pip
direnv

direnv

direnv makes sure the virtualenv is set up when you enter this directory it is responsible for installing the relevant python packages and for setting environmental variables needed

hook

To enable the direnv hook in bash:

echo 'eval "$(direnv hook bash)"'>> ~/.bashrc
. ~/.bashrc

enable direnv

direnv allow

Check out your localhost:8000

How to deploy this API on our GCP Compute Engine VM

# within a dedicated screen:
gunicorn --workers=3 --bind 0.0.0.0:8000 run

About

Backend of Djelli's homeproject, creating a mobile website showing vegan and vegetarian recipes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published