OCL client for OpenMRS is a web service that will allow OpenMRS users to manage their concepts on the web, allow reusability of the existing concepts and allow one to create their concepts if they are not in existence.
Ensure you have NodeJS and Npm installed before you start the installation process
Npm is distributed with Node.js- which means that when you download Node.js, you automatically get npm installed on your computer.
Set-up Process (Manual Environment Setup)
- Fork the repository by clicking on the Fork button located below the navigation bar on the right side of the page. - Clone the forked repository to your computer ensure to run the command below in the directory you want to store the project. # git clone [the url of the repository] For example; # git clone https://github.com/yourusername/openmrs-ocl-client.git - In the root directory of the project install all the dependencies using the command below $ npm install.
Run in development
- After installing all the dependencies:
- Run the command below to start the server
- The site should now be running at http://localhost:3000/ in the browser where you will see the app, You can change the port to your wish.
To change ports
- Modify scripts part of package.json and add the port you want to use:
1. For MacOs or Linux: "start": "PORT=3006 react-scripts start"
2. For Windows: "start": "set PORT=3006 && react-scripts start"
For instances where port 3000 is being used it will prompt you to reply with letter Y to change the port automatically.
Setting up with Docker
Our environments are running in docker.
Ensure you have docker installed and running locally. Install docker from here.
- Fork the repository by clicking on the Fork button located below the navigation bar on the right side of the page. - Clone the forked repository to your computer and ensure to run the command below in the directory you want to store the project. $ git clone [the url of the repository] For example: $ git clone https://github.com/yourusername/openmrs-ocl-client.git
Running the Docker Image
- Build the Docker image using the provided Dockerfile in the root folder. $ docker build -t openmrs/ocl-client:local . - Run the docker image using docker-compose $ docker-compose -f docker/docker-compose.yml up -d - Navigate to your http://localhost:8081/ You should now see your app running :)
To run tests $ npm test -- -u --coverage
Creating a Sass build
- To compile Sass to CSS each time you make a change to a file with a .scss file extension, run the command below. $ npm run build:css - For automated Sass compilation with styles hot reloading, run the command below $ npm run watch:css
How to contribute to this project?
- Please read OpenMRS wiki for awareness on the code of conduct used in OpenMRS organization
- And to get you started with the project please use the OpenMRS-OCL documentation
Talk to us on OpenMRS Talk