Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mubangizi/project-cohort-backend
A flask App with CRUD implementations
https://github.com/mubangizi/project-cohort-backend
Last synced: 29 days ago
JSON representation
A flask App with CRUD implementations
- Host: GitHub
- URL: https://github.com/mubangizi/project-cohort-backend
- Owner: Mubangizi
- Created: 2020-06-13T09:54:35.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-09-16T18:25:24.000Z (over 2 years ago)
- Last Synced: 2024-10-31T09:24:30.283Z (3 months ago)
- Language: Python
- Size: 45.9 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Matatu Project Cohort Api
With simple CRUD implementations### Project Setup
Follow these steps to have a local running copy of the app.
##### Clone The Repo
`git clone https://github.com/Mubangizi/project-cohort-backend.git`
If `master` is not up to date, `git checkout develop`. However, note that code on develop could be having some minor issues to sort.
##### Install PostgreSQL
Here's a great resource to check out:
[How To Install and Use PostgreSQL](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-18-04)
Create a development database and call it `cohort_db`.
##### Create a Virtual Environment
create virtual enviroment called venv
Run `virtualenv venv`
##### Activate the virtual environment.
Run `. venv/bin/activate`
App was developed with `Python 3.6`.
Make sure you have `pip` installed on your machine.
##### Install the dependencies.
`pip install -r requirements.txt`
##### Create a .env file
Create a `.env` file (which defines the environment variables used) at the root of the app.Add the following details, customizing as needed.
```
export FLASK_APP=server.py
export FLASK_ENV=development
export FLASK_RUN_PORT=5000
```##### Run Application
Run the application with this command`flask run`
##### To checkout Api Documentation
Through your browser go to link `localhost:/apidocs`.
For the deployed version of the Api, [click here](https://project-cohort-backend.herokuapp.com/apidocs/)