If you want to contribute to this code base, there is documentation in the docs directory. You can start by reading the general docs
- DHIS2 instance;
- node v9.3.0+;
- yarn v1.3.2+;
- Make a copy of file
.env.template - Rename it to
.env.development.local - Update the base url in this file if your DHIS2 installation is not available at
http://localhost:8080. For example, if your DHIS2 installation is available athttp://localhost:5000:REACT_APP_DHIS2_BASE_URL=http://localhost:5000 - Update your api version if your DHIS2 api version does not match the api version in
package.jsonatmanifest.webapp.dhis2.apiVersion - Add
http://localhost:3000url to your DHIS2 CORS whitelist. (This can be done in the settings app) - Execute the following commands:
yarn install yarn start
- Login to your DHIS2 instance in your browser
- Open your browser at
http://localhost:3000
To build a production version of the application run the following command:
yarn buildTo execute unit tests run the following command:
yarn testTo execute end to end tests run the following command:
export DHIS2_BASE_URL=http://your_dhis2_instance.com/
yarn test-e2eYou must have the dev server running on port 3000, as explained previously.