Hi @AK1239 . Thanks for the question and welcome to the DHIS2 Community of Practice! And welcome particularly to our development corner!
Local instance
First, we’d encourage you to set up a local DHIS2 instance for app development as this will be more stable (our play instances are reset regularly and are used by many people). There are currently a couple of options for spinning up a locale instance with docker:
Currently, you can proxy the play instances, but this may be restricted in the future. This instance is used by many people, so it’s not suited for heavy development tasks/modifications.
Local environment variables
In general, we discourage use of environment variables as they shouldn’t be necessary (e.g. the base url will be persisted after you login once in your app). Other values like proxy can be passed as command line arguments. Please refer to the list of supported values: Environment Variables | DHIS2 Developer Portal.
Running with proxy
The above said, you should be able to run with the proxy, e.g. if you remove the environment variables,
Make sure the port you’re running the app on (e.g. 3000) is added to the allowlist under settings (as @ulanbek pointed out )
you can now run yarn start --proxy https://play.im.dhis2.org/stable-2-41-0-1 --proxyPort 8082 (I’m going to run on port 8082, because I have something else running on 8080) (documentation: Proxy | DHIS2 Developer Portal)
check that the proxy is running by visiting http://localhost:8082/dhis-web-login/ (you may need to refresh this once or twice to get it to load) (there’s a bug with our proxy right now, so visiting http://localhost:8082 will insert a unnecessary stable-2-41-0-1 in the context path), and log in
visit your app and enter the server (http://localhost:8082) and authentication (e.g. admin/district):
Let us know if you have any difficulties. And again we’d encourage you to set up a local instance for development. Let us know if we can provide any help with that.