khanh96le / catalog-item-backend-api

The server-side provides Rest APIs with Flask-Restful, Flask-SQLAlchemy, Flask-JWT

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Server-side Catalog Item Rest API

Installation

Clone or download this project

git clone https://github.com/jerry-le/catalog-item-backend-api

Create virtual environment

Create a virtual environment from requirements.txt and enable it.

  • From conda
conda create -n flask-env python=3.5
pip install -r requirements.txt
source activate flask-env
  • From virtualenv
virtualenv flask-env
source flask-env/bin/activate
pip install -r requrements.txt

Run server

(flask-env) export FLASK_APP=autoapp.py

(flask-env) export FLASK_ENVIRONMENT=dev # For development env
(flask-env) export FLASK_ENVIRONMENT=prod # For production env

(flask-env)flask run --with-threads -h 0.0.0.0 -p 5000

Run test

(flask-env) flask test

Show all available endpoints

(flask-env) flask urls

About

The server-side provides Rest APIs with Flask-Restful, Flask-SQLAlchemy, Flask-JWT


Languages

Language:Python 97.9%Language:Mako 1.2%Language:Shell 0.9%