This guide provides instructions for setting up your development environment for the eCR Now application on macOS.
(N.B., I asked an AI to write most of it, hit me up if any issues...)
All instructions in this guide are specific to macOS. The eCR Now application requires:
- Java 17
- Maven 3.3.x or higher
- PostgreSQL 10.x or higher
SDKMAN is a tool for managing parallel versions of multiple Software Development Kits on most Unix-based systems. We'll use it to install Java and Maven.
Open Terminal and run:
curl -s "https://get.sdkman.io" | bash
Follow the instructions on screen to complete the installation.
To verify the installation, open a new terminal window and run:
sdk version
For Fish users
If you use the Fish shell, you'll need to install the Fish SDKMAN plugin using Fisher:- First, install Fisher if you don't have it already:
curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher
- Then install the SDKMAN plugin:
fisher install reitzig/sdkman-for-fish
- Set the environment variable SDKMAN_DIR:
set -Ux SDKMAN_DIR ~/.sdkman
- Verify the installation:
sdk version
With SDKMAN installed, you can now install Temurin Java 17. We're using Temurin because it's a FOSS JVM and Oracle won't try to make us pay for it later.
sdk install java 17.0.9-tem
This will install the latest Temurin Java 17 version available through SDKMAN.
To verify the installation:
java -version
You should see output indicating you're using Temurin Java 17.
Install Maven using SDKMAN (do not use Homebrew as it may install a different Java version):
sdk install maven 3.9.10
To verify the installation:
mvn --version
This should show the Maven version and confirm it's using the Java 17 installation we set up earlier.
git clone https://github.com/drajer-health/eCRNow.git
cd eCRNow
Create a PostgreSQL database for the project:
createdb -h localhost -p 5432 -U your_username ecrnow_db
Or use a tool like pgAdmin to create the database.
Update the database configuration in src/main/resources/application.properties
as needed.
Build the application using Maven:
mvn clean install
Run the application using:
java -Djdbc.username=your_username -Djdbc.password=your_password -Dsecurity.key=your_security_key -jar ./target/ecr-now.war
Replace your_username
, your_password
, and your_security_key
with your actual PostgreSQL credentials and a security key for encrypting sensitive information.
For more detailed information about the application, refer to: