This project contains two separate full-stack applications that serve the same purpose but are implemented in different technologies:
- Node.js App: Express.js backend rendering HTML pages using the Pug template engine
- Java App: Spring Boot backend rendering HTML pages using Thymeleaf templates
Both apps are structured for easy local development and deployment to SAP BTP Cockpit using Cloud Foundry.
- Node.js (v18+ recommended)
cd node-backend
npm install
npm startYou can view the app at:
http://localhost:3000
- Java (v17+ recommended)
- Maven (for building the Java app)
cd java-backend
mvn clean install
mvn spring-boot:runYou can view the app at:
http://localhost:8080
Each app is deployed independently and works as a self-contained full-stack app.
cd node-backend
npm run build
npm run zip
cd ..
This will prepare a build.zip ready for deployment.
- Make sure the
build.zipis located in the root directory. - Check your
manifest.yaml, located innode-backend/manifest.yaml - Deploy the frontend using the BTP Cockpit UI:
- Go to Applications page and click Deploy button
- Upload the ZIP file from
node-backend/build.zip - Upload the
node-backend/manifest.yaml
Make sure the application started successfully and is running.
cd java-backend
mvn clean install
cd ..
- Make sure the JAR is located in
java-backend/target/java-demo-app-0.0.1-SNAPSHOT.jar - Check your
manifest.yaml, located injava-backend/manifest.yaml - Deploy the backend using the BTP Cockpit UI:
- Go to Applications page and click Deploy button
- Upload the JAR file from
java-backend/target/java-demo-app-0.0.1-SNAPSHOT.jar - Upload the
java-backend/manifest.yaml
Make sure the application started successfully and is running.
Each app is configured to use environment variable for customization. By default, it is set to false.
If you want to switch to dark theme, you can set the environment variable DARK_MODE to true in your BTP environment.