OWA’s (Open Web App) are simple web apps developed using web technologies like JS, HTML and CSS. OpenMRS REST API can be used for the server side calls. Please refer this OpenMRS wiki page before working on OWA.
Mostly you have to edit values of version, name, description & developer.
4. Install the yarn dependencies
This OWA uses yarn as a package manager and for its build tasks.
5. Compile the code and build the artifacts
For development 'watching mode'
This command also triggers the watch mode for debugging. This means that any changes will trigger an update to the main app.js in order to hot-deploy changes while developing.
This command minified bundles for production.
The output of build in
6. Deployment for runtime debugging
Check your OWA settings admin page at /openmrs/module/owa/settings.form on your runtime instance of OpenMRS.
The key setting is the 'App Folder Path' that contents OWA Apps. Typically the location for all OWAs of your OpenMRS instance should be in /opt/openmrs/owa , the idea would be to symlink the content of the OWA to your code repo:
This is assuming that Tomcat is able to serve symlinked content. If that is not an option, then you will have to copy (instead of symlinking) the content of the app folder of your local repository to /opt/openmrs/owa/boilerplate each time you want to observe a change that you have made.
OR create a zip /app folder. Then Browse and Upload it from OpenMRS UI as mentioned in the below screenshot.
To upload it from OpenMRS UI, you need to setmodule.allow_web_adminvalue totruein/opt/openmrs/etc/openmrs-runtime.propertiesfile. This value is set tofalseby default.