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" | bashFollow the instructions on screen to complete the installation.
To verify the installation, open a new terminal window and run:
sdk versionFor 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 versionWith 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-temThis will install the latest Temurin Java 17 version available through SDKMAN.
To verify the installation:
java -versionYou 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.10To verify the installation:
mvn --versionThis 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 eCRNowCreate a PostgreSQL database for the project:
createdb -h localhost -p 5432 -U your_username ecrnow_dbOr 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 installRun the application using:
java -Djdbc.username=your_username -Djdbc.password=your_password -Dsecurity.key=your_security_key -jar ./target/ecr-now.warReplace 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: