Logo Lanfrica

MOH-Zambia/MFL_REST

Domain:

healthcaredigital infrastructure

Record type:

software
Creator:
MOH
Host:
MOH Master Facility List REST API Dependencies ------------------- * Java 8 or higher -- Refer to the installation documentation for each operating system * Apache Maven -- Refer to the installation documentation for each operating system Setup and Installation steps ---------------------------- ``` - Clone the project to the installation directory of your choice - Update the application.properties file located in "src/main/resources" with the following * Database details: DB host IP & port,DB name, password & username * Embedded Tomcat Port: The API by default listens on port 8080, if there is an application that is currently listening on port 8080, you can change the port number in the properties file by editing the line "server.port" - Once the configurations have been updated, navigate into the project root folder and run below command to build the project * mvn clean package * If there are errors, the build will not complete otherwise the project will build successfully * java -jar target/jar_name-0.0.1-SNAPSHOT.jar * The above command should start the application and you should see some start up lines on the screen which should include the line "Tomcat started on port(s): PORT" - In production/staging, you can setup the API to run as a service. Linux -------------------------------------------- * For linux, the simplest setup is using Systemd. * Open the file mfl.service that comes with the project using your favorite text editor * When the file is open, modify line 7 "ExecStart" and provide the location of the project jar file and also line 6 "User" and provide the operating system user allowed to run the application. * Once the lines have been modified copy the file to /etc/systemd/system directory * This installation would have been completed. To run the application you can use below command - service mfl start * Similarly you can use stop, restart, status Windows ---------------------------------------- * For Windows you can use the "Windows Servi …