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
+13-7Lines changed: 13 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,13 +54,11 @@ Notes:
54
54
55
55
- Requests to DHIS2 will be transparently proxied (see `src/setupProxy.js`) from `http://localhost:8081/dhis2/path` to `http://localhost:8080/path` to avoid CORS and cross-domain problems.
56
56
57
-
- The optional environment variable `REACT_APP_DHIS2_AUTH=USERNAME:PASSWORD` forces some credentials to be used by the proxy. This variable is usually not set, so the app has the same user logged in at `REACT_APP_DHIS2_BASE_URL`.
58
-
59
-
- The optional environment variable `REACT_APP_PROXY_LOG_LEVEL` can be helpful to debug the proxyfied requests (accepts: "warn" | "debug" | "info" | "error" | "silent")
57
+
- The optional environment variable `VITE_DHIS2_AUTH=USERNAME:PASSWORD` forces some credentials to be used by the proxy. This variable is usually not set, so the app has the same user logged in at `VITE_DHIS2_BASE_URL`.
60
58
61
59
- Create a file `.env.local` (copy it from `.env`) to customize environment variables so you can simply run `yarn start`.
62
60
63
-
-[why-did-you-render](https://github.com/welldone-software/why-did-you-render) is installed, but it does not work when using standard react scripts (`yarn start`). Instead, use `yarn craco-start`to debug re-renders with WDYR. Note that hot reloading does not work out-of-the-box with [craco](https://github.com/gsoft-inc/craco).
61
+
-[why-did-you-render](https://github.com/welldone-software/why-did-you-render) is installed and runs in development mode by default. Edit `src/presentation/utils/wdyr.ts`to customize or disable it.
64
62
65
63
### Customization of the development server:
66
64
@@ -73,7 +71,7 @@ This will open the development server for the given front-end at port 8082 and w
73
71
### Customize DHIS2 instance url
74
72
75
73
```
76
-
REACT_APP_DHIS2_BASE_URL=http://localhost:8080
74
+
VITE_DHIS2_BASE_URL=http://localhost:8080
77
75
```
78
76
79
77
To use a different DHIS2 instance url set this environment variable before running a `start` command.
Application should be running at CYPRESS_ROOT_URL with as the environment variable REACT_APP_CYPRESS set to True.
99
+
Application should be running at CYPRESS_ROOT_URL with as the environment variable VITE_CYPRESS set to True.
102
100
103
101
For this to work in Travis CI, you will have to create an environment variables (Settings -> Environment Variables) CYPRESS_DHIS2_AUTH with the password used in your testing DHIS2 instance and CYPRESS_ENCRYPTION_KEY used to encrypt passwords of receiver instances.
0 commit comments