@@ -7,5 +7,40 @@ This is a demo project for Spring Boot with Module Federation and Angular.
7
7
The project hosts a single Spring Boot application.
8
8
The ` /application ` folder contains the Angular application.
9
9
The ` /library ` folder contains a micro frontend application.
10
+ The ` /core ` folder contains a shared library, both Java and Angular
10
11
11
12
When both application are built, the Spring Boot application will serve the Angular application and the micro frontend application.
13
+
14
+ ### Install the local core library
15
+
16
+ The easy way to install core library is having a local ` verdaccio ` server :
17
+
18
+ ` npm i verdaccio -g `
19
+
20
+ Then you simply go to the ` core/ng-core ` project and publish the library on the default port :
21
+
22
+ ` "publish:core:local": "ng build core && cd dist/core && npm publish --registry http://localhost:4873/" `
23
+
24
+ ### Install the core library on both shell and mfe1
25
+
26
+ You simply install core from local registry :
27
+
28
+ ` npm i core --registry http://localhost:4873/ `
29
+
30
+ Do it on both Angular applications.
31
+
32
+ ### Build the shell and the mfe1
33
+
34
+ Both projects are configured to be built in the appropriate public Spring folder.
35
+ So you simply run build scripts :
36
+
37
+ ```
38
+ "build:shell": "ng build --base-href /ng-shell/ --configuration production",
39
+ "build:mfe1": "ng build --base-href /ng-shell/mfe1/ --configuration production",
40
+ ```
41
+
42
+ ### Run Spring Boot application
43
+
44
+ Run ShellApplication Java class.
45
+ You just need to run the application with the proper argument as base path :
46
+ ` --server.servlet.context-path=/ng-shell `
0 commit comments