VA Health
Master application for a REST api to the Eureka SDK and Vue.js based frontend
api-flask
- Install required libraries
cd api-flask
pip install -r requirements.txt
- Set necessary environment variables in
api-flask/.env
- Do NOT use spaces for the values
EUREKA_USER="firstname.lastname@symphonyai.com"
EUREKA_PASS="my_password"
AYASDI_APISERVER="https://platform.ayasdi.com/workbench/"
SOURCE_NAME="iris.csv"
FLASK_APP="app.py"
FLASK_DEBUG="1"
SOURCE_NAME_HOLDOUT="va_health_test.csv"
NETWORK_NAME="OAA_1"
For local development, this script will start up the flask server
scripts\api-run.sh
frontend-vue
Web application integrating bootstrap based coreui with Vue. Initial scafold done with Vue CLI. The project can be deployed as a docker container
Integration and Links
- Vue cli used to generate this project
- Style Guide for Vue. Attempting to follow as best as possible
- CoreUI Bootstrap theme
- Bootstrap-Vue components
- Vue Router for view management
- Vuex for state management
- vue-mobile-detection for checking mobile state
- axios as http client
- Highcharts as graphing library
- Highcharts Vue Vue wrapper for Highcharts
- jsonplaceholder for sample table data
Project setup
- Install a nodejs runtime is installed (LTS)
npm install
Compiles and hot-reloads for development
npm run serve
- The server will be running on http://localhost:3000
Compiles and minifies for production
npm run build
Docker Container Running, Exporting
-
Inside the
scripts
folder are all the bash scripts for building, running and exporting containers -
Make sure the api and frontend images are built with
api-build.sh
andfrontend-build.sh
-
Run the containers with
run-all.sh
or individually withapi-run.sh
andfrontend-run.sh
Make sure there is a .env file with the environment variables for the api conatiner to read.
.env
can be in theapi-flask
folder or thescripts
folder
The frontend container script checks to see if the api container is running and gets the ip address of the container. This address is injected as the environment variable
API_ADDRESS
-
Stop all the containers with
stop-all.sh
-
Build the tar files with
save-tar.sh
-
Load the save file with
load-tar.sh
Postman
Testing api-flask inTODO
- Import the environment
- Import the collection