AlexITC / demo-python-flask-postgres

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

demo-python-flask-postgres

Simple PoC using Flask, Postgres and SQLAlchemy

How to install

Run in the project root directory

$ sudo apt-get install python-virtualenv
$ python3 -m venv venv
$ . venv/bin/activate
$ pip install -r requirements.txt

How to run

While on virtualenv

$ flask run

With gunicorn:

pip install gunicorn
gunicorn 'app:app'

Environment variables

POSTGRES_HOST=???
POSTGRES_DATABASE=???
POSTGRES_USERNAME=???
POSTGRES_PASSWORD=???
# for flask
FLASK_RUN_PORT=???
# for gunicorn
PORT=???

About


Languages

Language:Python 99.7%Language:Shell 0.3%