Skip to content
This repository was archived by the owner on May 2, 2023. It is now read-only.

Latest commit

 

History

53 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contacts App Restful

Running

  1. Clone the repo :
$ git clone https://gitlab.com/sreecodeslayer/contact-app-restful.git
$ cd contact-app-restful
  1. Create databases : contacts and contacts_test in postgres
psql> CREATE DATABASE contacts;
psql> CREATE DATABASE contacts_test;
  1. Install requirements in a virtual env of Python 3.6+
$ pip install -r requirements.txt
$ pip install -e .

Optionally to run tests, install Pytest as well

$ pip install pytest
  1. Run migrations
$ export CONTACTS_ENV=dev
$ export FLASK_APP=run.py
$ flask db init
$ flask db migrate
$ flask db upgrade
  1. Optionally run tests
$ pytest
  1. Running API via gunicorn
$ pip install gunicorn
$ gunicorn run:application -w 4

Configurations regarding Postgres Connection is inside contacts/config.py and can be configured as per the needs. Currently the app will try to connect with postgres:postgres to locahost

Testing

  1. Testing covers unit tests for User model and Records model (contacts table)
  2. Testing also covers different aspects of API integration with the models like the Login/Signup cases, Auth based API requests for CRUD of contacts.

This project was initiated using the cookiecutter from my github repo

About

A minimal contact store platform

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages