Please donate whether you wish support us to give more time to app's growth | ![]() |
---|
The frontend-app is gotten from :https://github.com/creativetimofficial/material-dashboard-angular. The project produces an only jar using maven spring-boot, that is you can implement java backend services, together the angular client developed in typescript (angular-cli). Download the zip of this branch or clone the git repo.
The project is used to develop the client in the frontend-app folder with the angular-cli, and the java backend with the maven spring boot project configured. For this, import your client (frontend-app) in the angular/typescript IDE (i.e. visual studio code) and your maven java backend in Eclipse.
The steps to build the jar are defined in the pom.xml file. The project builds the frontend with the output folder frontend-app/dist and copies it in the src/main/resources/static folder in order to load the client in the spring boot home page together the java services. The port information is stored in src/main/resources/application.properties file in the server.port property.
- Angular cli:
npm install -g @angular/cli
-
JDK 8
-
The last Node.js version
-
MAVEN (to use mvn command else use in windows ./mvnw.cmd or in linux ./mvnw instead)
-
IDE ( i.e. Eclipse for java and visual studio code for typescript/angular projects)
Execute in the main folder of this repo, if you have already built the frontend and there is the generated code in frontend-app/dist :
mvn clean spring-boot:run
else:
mvn clean spring-boot:run -Pbuild-ui
Open browser on localhost:8081
If you have already built the frontend (i. e. after develop on visual studio code) and you have the generated code of the ng build in frontend-app/dist, execute in the main folder of this repo:
mvn clean package
If you want to build also the frontend, run:
mvn clean package -Pbuild-ui
After all cases run:
java -jar target/*.jar
Open browser on localhost:8081
Move app.jar in electron-app folder and in this run electron main after npm i electron -g. The port is specified in the electron-app/index.html.
THIS IS A PILOT IN DEVELOPMENT BECAUSE THE ELECTRON LIVE WORKS BAD IN RENDERING AND ELECTRON-PACKAGER INSTEAD BREAKS.
Create an account on keroku (https://www.heroku.com/)
After install the heroku-cli
npm install -g heroku-cli
Then:
heroku plugins:install heroku-cli-deploy heroku create spring-boot-angular-app2 --no-remote
To deploy the jar file, execute in the main folder of this repo:
heroku deploy:jar target/app.jar --app spring-boot-angular-app2
View in : https://spring-boot-angular-app2.herokuapp.com/.
A demo is on https://spring-boot-angular-app.herokuapp.com/