A seed repo for hackathons
- Install Visual Studio Code
- Install node and npm
git clone https://github.com/joeldenning/openmrs-esm-patient-dashboard.git
- Fork https://github.com/joeldenning/openmrs-esm-hackathon-seed. Clone your fork.
npm install
inside of both repos- Inside of patient-dashboard, modify dashboard-widgets.js and add the following to the
patientDashboardWidgets
array:() => System.import('@openmrs/my-dashboard-widget')
. You should name your widget something besidesmy-dashboard-widget
. - Inside of patient-dashboard,
npm start -- --https --no-inline --port 8081
- In a new terminal, run the following inside of hackathon-seed:
npm start -- --https --no-inline --port 8082
- Go to https://openmrs-spa.org/openmsr/spa/login in a browser.
- Now trust all insecure localhost requests.
- Open up the browser console and run the following commands:
importMapOverrides.addOverride('@hackathon/patient-dashboard', 'https://localhost:8081/patient-dashboard.js');
importMapOverrides.addOverride('@hackathon/my-dashboard-widget', 'https://localhost:8082/hackathon-seed.js');
- Refresh the page.
- Login with username
admin
and passwordadmin123
. - Search for the patient called "hornblower". Click on the row in the table.
- You should now see a widget that says "hackathon seed is working!"
- Inside of hackathon-seed repo, modify the text inside of
root.component.tsx
. - In the browser, refresh the page. You should see your code modified.