0.2.0-pre.18 • Published 3 years ago
openmrs-esm-ohri-app v0.2.0-pre.18
OpenMRS OHRI App
A simple OpenMRS Microfrontend for learning and development purposes
Folder structure highlights
src
- Main files for the appsrc/index.ts
- Performs configurations and loads root.component.tssrc/root.component.ts
- Loads and routes components for the app around a user contextsrc/<component name>
src/<component name>/<component name>.component.tsx
- Main component filesrc/<component name>/<component name>.component.test.tsx
- Tests for the componentsrc/<component name>/<component name>.resource.tsx
- Helpers for component (e.g. API interaction)
How do I use it?
First, make sure to fork this repo.
Installation
Clone the forked repo to your computer and proceed as:
git clone https://github.com/<your github username>/openmrs-esm-ohri-app.git
cd openmrs-esm-ohri-app
npm install
npm run start
The core app will be served on localhost:8080
On a separate terminal, serve the local microfrontend module
npm run serve
The module will be served on localhost:8081
Now, on a browser, navigate to localhost:8080
. Your screen should look like this:
How do I check that the module is running?
- On the core app, click on the bottom right square on the screen to open
dev-tools
- Then, scroll down the list of modules and locate the module
openmrs-esm-ohri-app
- Close the
dev-tools
window - Navigate to
localhost:8080/openmrs/spa/patients/hts/form
, where your screen should look like this:
Note: Whenever you create a module, it is displayed by navigating to an assigned route
0.2.0-pre.19
3 years ago
0.2.0-pre.18
3 years ago