Top community members
All Wiki Articles Create Wiki Article

Many years me and my friends we were volunteers on my university doing programming classes for young people.

I got main conclusion: Young people are awesome, especially students, because they always bring new and fresh ideas :)
* I loved to do it but my time is limited

  I decided to create something that will help millions of students

Now I am here

co-founder

Angular - build angular project for production (npm package prod) with spring boot app

0 contributions
9 points

1. Build Angular project for production

From the root of our our_project_name run command:

ng build --prod

angular will output the results of the build to:

dist/our_project_name/

2. Build package angular dist with spring boot

Copy the dist/our_project_name/
Copy only the content of 'dist/our_project_name/' without dir 'our_project_name'

to spring project under path:
spring_project_name/src/main/resources/static

Run:

mvn install

in target dir we will get jar:
spring_project_name.jar

Run jar from cmd:

java -jar spring_project_name.jar

- and we will have frontend served from spring project
the application port is the same as specified in application.properties eg:
server.port=8081

Default spring boot port if not specified is 8080

0 contributions

Checkout latest Findings & News:

Checkout latest questions:

Checkout latest wiki articles:

Hey 👋
Would you like to know what we do?
  • Dirask is IT community, where we share coding knowledge and help each other to solve coding problems.
  • We welcome everyone,
    no matter what the experience,
    no matter how basic the question is,
    this community will help you.
Read more