This repository is a companion to Flexpa's quickstart guide which provides a detailed explanation of how this code example works.
You must have valid publishable and secret keys for Flexpa API. Generate test mode API keys or contact us to obtain production API keys. Once you have the API keys, you're ready to go!
Node must be installed on your machine.
First you must clone the quickstart repository. You can do this using HTTPS:
git clone https://github.com/flexpa/quickstart.git
cd quickstartYou'll need to add your Flexpa publishable and secret keys to a .env file in the client and server directories.
Rename the files .env.template to .env in both directories and update the values to your publishable and secret keys.
cp client/.env.template client/.env
cp server/.env.template server/.envOpen both client/.env and server/.env in a text editor and replace the values with your Test Mode API keys.
# client/.env
VITE_FLEXPA_PUBLISHABLE_KEY=# server/.env
FLEXPA_API_SECRET_KEY=During development, you will need to use the test mode API keys rather than the production ones.
First, run the development client:
cd client
nvm use
npm install
npm run devNote: nvm is not supported on Windows. If you are using Windows, ensure you have the correct version of Node installed. See .nvmrc for the recommended version.
Next, run the development server:
cd server
nvm use
npm install
npm run build
npm run devOpen http://localhost:3000 with your browser to see the result.
You can use the following test patient login with Humana:
-
Username: HUser00007
-
Password: PW00007!
Use Docker Compose with this project by, first, editing compose.yaml to add your Flexpa publishable and secret keys adding them to:
VITE_FLEXPA_PUBLISHABLE_KEY=
FLEXPA_API_SECRET_KEY=Then, run the project with:
docker-compose up --buildOpen http://localhost:3000 with your browser to see the result.
