I want to generate a new ReactJS Open Web Application(OWA) for OpenMRS. How can I do that? cc: @beingtmk
@judeniroshan Hope you find this link helpful
1 Like
These are the two repositories using which you can generate a OWA according to the need,
- Minimalistic Template - Template with comes with openmrs-react-components installed & configured
- Example Template - Components Showcase Template
Detailed Instruction are given in the Readme of the repositories!
Pre-requisites :
- node
- create-react-app
- A distribution of OpenMRS Server
Here is the gist, say you want to generate a template named “test-app” with minimal configuration with cra,
you will use the below command:
npx create-react-app test-app --scripts-version openmrs-react-scripts
Important : After this is done you will have to set up a .env file which provides the appropriate server variables given below.
- REACT_APP_SERVER_ADDRESS=[OpenMRS Server Address Goes Here]
- REACT_APP_SERVER_CONTEXT_PATH=[OpenMRS Server Context Path Goes Here]
Once this is done you can just start up the app with,
npm start