Skip to content

wentinggy/medipal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Setup

Backend Setup

Database Setup

  1. Install MySQL if not done so on https://dev.mysql.com/downloads/installer/
  2. Open up the MySQL command line and run CREATE DATABASE medipal; to create the database
  3. Schema will be autogenerated once the server runs

Server setup

  1. Change into backend directory by running cd medipal-backend
  2. Create a virtual environment to manage dependencies by running python -m venv be_venv
  3. Activate virtual environment by running be_venv/scripts/activate (OS-dependent command)
  4. Install required dependencies by running python -m pip install -r requirements.txt
  5. For local setup, enable CORS for localhost by modifying app.py:
    from flask import Flask
    from flask_cors import CORS
    
    app = Flask(name)
    app.config.from_object(ApplicationConfig)
    CORS(
         app,
         resources={r"/api/*": {"origins": "http://localhost:3000"}},
         supports_credentials=True,
    )
  6. For MacOS users, change the port to run on 8000 due to conflicting ports and change accordingly in the frontend .env
  7. Add the .env file to load the environmental variables
  8. Start up the backend server by running python app.py

Frontend Setup

  1. Change into frontend directory by running cd fe
  2. Install the required packages for initial start by running npm install
  3. Start up the frontend server by running npm start

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published