Skip to content

Latest commit

 

History

History
60 lines (49 loc) · 1.46 KB

README.md

File metadata and controls

60 lines (49 loc) · 1.46 KB

CodeSnap Backend

This repository contains the backend code for the CodeSnap project. The backend is built using Flask, a lightweight WSGI web application framework in Python.

Requirements

  • Python
  • Flask
  • Flask SQLAlchemy
  • Flask Marshmallow
  • Flask Restfull
  • Flask CORS

Technologies

Python Flask PyPi MySQL VSCode

Configuration

  1. Step into folder
cd backend
  1. Create virtual environment
virtualenv venv 
  1. Activate the venv
source venv/bin/activate
  1. Install the dependencies
pip install -r requirements.txt
  1. Copy the .env.example to .env and setup your DB on .env

  2. Setup the DB

SQLALCHEMY_DATABASE_URI="mysql+mysqlconnector://DB_USERNAME:[email protected]:3306/DB_DATABASE"
  1. Run the migrations
flask db upgrade
  1. Run the seeders
flask seeders all
  1. Run the flask app
flask run