npm install
npm run-script build
mvn clean package
java -jar /target/{jar-name-here}
- Java 21
- Maven
- Postgresql
- NPM
- pgAdmin 4 - for Postgresql
The CSS is built using maven. When running the package command, the css should be compiled and minified.
The output file is located at ./src/main/resources/static/css/main.min.css
- Go to the home directory of the project
- Run the below command.
npm run-script build
The output file is located at ./src/main/resources/static/js/main.js
You should think about this as two steps. There is a frontend and there is a backend. We need to compile everything for the frontend first, then we need to package those frontend components into the jar file where the backend resources will live. Our final product is a single package with all of our components for the frontend and the api.
npm run-script build
npm run-script build
This command will compile our frontend components.
mvn clean package
This command will compile our backend components.
npm run-script build;mvn clean package
You could do this and combine these steps into one.
npm install
mvn clean package
Set SPRING_ACTIVE_PROFILE to "local" in your environment variables
- Go to the home directory of the project
- Run the below command.
java -jar ./target/output.jar