Skip to content

Commit 37f3f66

Browse files
committed
update env variables
1 parent 8b23d97 commit 37f3f66

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,43 @@ The backend consists of multiple HTTP GET, POST, PATCH, or DELETE routes, most o
1919

2020
The frontend displays pending, approved, and picked up proprietary doctor orders at [http://localhost:5050/DoctorOrders](http://localhost:5050/DoctorOrders). While there is a login page at [http://localhost:5050](http://localhost:5050) for a dummy user, there is no user authentication or authorization system.
2121

22+
## Environment Variables
23+
24+
The PIMS system uses environment variables to configure both the frontend and backend services.
25+
26+
### Frontend Environment Variables
27+
28+
The frontend environment variables are configured in `frontend/.env`:
29+
30+
| Variable Name | Default Value | Description |
31+
| ------------- | ------------- | ----------- |
32+
| PORT | `5050` | The port that the frontend server runs on. Change if there are conflicts with port usage. |
33+
| REACT_APP_PIMS_BACKEND_PORT | `5051` | The port that the backend server runs on. Must match the backend's `BACKEND_PORT` setting. |
34+
35+
To override defaults, either:
36+
- Start the app with environment variables: `PORT=5050 npm start`
37+
- Create a `frontend/.env.local` file with the desired values
38+
39+
### Backend Environment Variables
40+
41+
The backend environment variables are configured in `backend/env.json`:
42+
43+
| Variable Name | Default Value | Description |
44+
| ------------- | ------------- | ----------- |
45+
| BACKEND_PORT | `5051` | The port that the backend server runs on. Change if there are conflicts with port usage. |
46+
| ALLOWED_ORIGIN | `*` | CORS allowed origins. Specify domains that are allowed to access the backend API. |
47+
| MONGO_USERNAME | `pims-user` | Username for MongoDB authentication. Should match the user created during MongoDB setup. |
48+
| MONGO_PASSWORD | `pims-pass` | Password for MongoDB authentication. Should match the password created during MongoDB setup. |
49+
| MONGO_URL | `mongodb://localhost:27017/pims` | MongoDB connection URL. Update if using a different host, port, or database name. |
50+
| AUTH_SOURCE | `pims` | MongoDB authentication source database name. |
51+
| HTTPS_KEY_PATH | `server.key` | Path to the HTTPS private key file. Required only if `USE_HTTPS` is true. |
52+
| HTTPS_CERT_PATH | `server.cert` | Path to the HTTPS certificate file. Required only if `USE_HTTPS` is true. |
53+
| USE_HTTPS | `false` | Set to `true` to enable HTTPS. Ensure valid certificate and key paths are configured. |
54+
| EHR_RXFILL_URL | `http://localhost:8080/test-ehr/ncpdp/script` | URL endpoint for sending RxFill messages to the EHR system. |
55+
| USE_INTERMEDIARY | `true` | Set to `true` to route ETASU checks through the REMS intermediary instead of directly to REMS admin. |
56+
| INTERMEDIARY_FHIR_URL | `http://localhost:3003/4_0_0` | Base URL of the REMS intermediary FHIR server. Used when `USE_INTERMEDIARY` is true. |
57+
| REMS_ADMIN_NCPDP | `http://localhost:8090/ncpdp/script` | URL endpoint for sending NCPDP Script messages directly to REMS admin. |
58+
2259
## Setup
2360

2461
For an initial setup run `npm install` in both the frontend and backend subdirectories. This will install the dependencies required for each of the services.

0 commit comments

Comments
 (0)