Skip to content

yeboah326/xpense-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xpense-api

API for the xpense react application. View the API documentation : https://infinite-taiga-28404.herokuapp.com/redoc

Project Setup

Create Database in PostgreSQL

psql
CREATE DATABASE xpense_db;

Create .env file in the root of the project

touch .env

Add the following lines to the file

FLASK_APP=run.py
DATABASE_URL=postgresql://username:password@localhost:5432/xpense_db
JWT_SECRET_KEY='secret key'
JWT_ERROR_MESSAGE_KEY=message

Generate JWT_SECRET_KEY (Optional)

# Run in python shell
import secrets
secrets.token_hex()

Install project requirements

pip install -r requirements.txt

Perform Migrations

source env/bin/activate
flask db migrate
flask db upgrade

Run the code

flask run

About

API for the xpense react application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors