You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+37Lines changed: 37 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,43 @@ The backend consists of multiple HTTP GET, POST, PATCH, or DELETE routes, most o
19
19
20
20
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.
21
21
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. |
| 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
+
22
59
## Setup
23
60
24
61
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