- Getting started
- Prerequisites
- Clone the repository
- Configuration
- Installation
- Starting the Node server and Frontend app
This repository was created to assist you in getting started with the NexHealth API. Using this repository, you can rapidly create a Node server that interacts with the NexHealth API for appointment scheduling and provider management.
You can book appointments, view them, and manage the providers using the frontend app built with React.
Please ensure that you have the most recent version of Node installed. You can download the latest version of Node here.
Using https:
git clone https://github.com/prabhuignoto/NexHealth
cd NexHealth
Alternatively, if you use ssh:
git clone git@github.com:prabhuignoto/NexHealth.git
cd NexHealth
-
To request access to the NexHealth API, fill out this form. You should receive a subdomain, a location_id, and an API Key.
-
Populate an
.env
file inserver/
with the credentials from above.
cd NexHealth
touch server/.env
Add values for the below properties:
Properties | Description |
---|---|
API_URL | Sandbox url e.g: https://sandbox.nexhealth.com |
SUBDOMAIN | Refers to a specific institution |
LOCATION_ID | Refers to a specific location |
API_KEY | API Key provided by NexHealth |
Please use the sample .env.example
located under the server/
folder as a template.
API_URL=https://sandbox.nexhealth.com
SUBDOMAIN=xxxx
LOCATION_ID=xxxx
API_KEY=xxxx
Note:
.env
files are convenient for local development. Do not run production applications using .env files.
Please contact the NexHealth team if you have any questions about these values.
Install the required dependencies using the following command:
cd ./server
npm install
cd ./frontend
npm install
Navigate to the server folder and run the following command:
cd ./server
npm run start
If everything is working, you should see the following message:
[nodemon] reading config .\nodemon.json
[nodemon] to restart at any time, enter `rs`
[nodemon] or send SIGHUP to 14688 to restart
[nodemon] ignoring: .git node_modules/**/node_modules
[nodemon] watching path(s): *.js routers\*.js
[nodemon] watching extensions: js,json
[nodemon] starting `node --harmony index.js`
[nodemon] spawning
[nodemon] child pid: 11036
[nodemon] watching 8 files
Server is running on port 4000
To start the frontend app:
cd ./frontend
npm run start
If everything was set up correctly, you should be able to access the UI at the following url: http://localhost:3000/