Skip to content

devtamer/healthtrack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setting up the API

NOTE: SECRET_KEY and SQLALCHEMY_DATABASE_URI are set to ENVIRONMENT variables. Modify your bashrc or other shell initializiation folder (zshrc, or set using windows commands if on that OS | you can set these values to anything at the moment, but these will be importantly hidden out of production code for security reasons when the program is deployed. we just want to make sure these values can be accessed by our code during development. see config.py)
Example for configuring environment variables:
vi ./bashrc
Add SECRET_KEY and SQLALCHEMY_DATABASE_URI environment variables:
export SECRET_KEY='SuperSecretKey'
export SQLALCHEMY_DATABASE_URI='postgresql://postgres:password@localhost/health'
Above command assumes that you have a PostgreSQL database on the localhost named 'health'

  1. This application is currently under development using Python 3.8.10.
  2. In order to launch the site, you will need to set up the virtual environment first.
  3. Once you have set up/cloned the repository, navigate to the top level directory. (contains health_app/ folder, requirements.txt, etc.)
  4. Create a new virtual environment in the top level directory by running the command python3 -m venv venv/, which will create a directory venv/ with the enviroment.
  5. Activate the virtual environment by running source venv/bin/activate while in api directory.
  6. Update the enviroment with the necessary dependencies from requirements.txt by running the command pip3 install -r requirements.txt
  7. Once your venv is activated and the dependencies are installed, you can launch api by running flask run while in the top level directory.
  8. Once you have set up a PostgreSQL database and configured the environment variables as necessary (see above), you can populate the database with mock data by running the script, populate_db.py located in api/script (remember to launch the api before executing the script or else the requests won't go through)

Setting up the front end

  1. Navigate to frontend/
  2. Install dependencies: npm install
  3. Run the application: npm run dev

About

Full Stack Health Care Application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors