It's time to create a new Web app! Below we'll show you how to quickly bootstrap an app and how to connect it to a DHIS2 instance (check the previous section if you haven't yet installed yarn or the DHIS2 CLI which will provide the d2 command used below).
Creating a new Web app
- From the terminal, create a new DHIS2 app called "my-app"
d2 app scripts init my-app
- Change directories to
./my-appand start the app
cd my-app && yarn start
Connecting your Web app to DHIS2
- From the browser, navigate to your DHIS2 instance url (if you're running DHIS2 locally via container the address is http://localhost:3000). You will see the following page:
- Enter your DHIS2 server URL and the username and password of the default admin user (local DHIS2 instance assumed in the example below)
- You will see the default admin user name and a welcome message
Congratulations! You are ready to start developing a DHIS2 app 🎊
Now that you have created a DHIS2 app and connected it to a DHIS2 instance you can learn more about developing apps on DHIS2.