-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1979bfc
commit 606cec2
Showing
7 changed files
with
119 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
## Adding Angular Universal to an Module Federation Project | ||
|
||
This brain dump shows how to add Angular Universal to our [example](https://github.com/manfredsteyer/module-federation-plugin-example). | ||
|
||
``` | ||
npm i @angular-architects/module-federation@latest --registry http://localhost:4873 | ||
ng g @angular-architects/module-federation:boot-async false --project shell | ||
ng add @nguniversal/common --project shell | ||
ng g @angular-architects/module-federation:boot-async true --project shell | ||
ng g @angular-architects/module-federation:nguniversal --project shell | ||
ng g @angular-architects/module-federation:boot-async false --project mfe1 | ||
ng add @nguniversal/common --project mfe1 | ||
ng g @angular-architects/module-federation:boot-async true --project mfe1 | ||
ng g @angular-architects/module-federation:nguniversal --project mfe1 | ||
Adjust projects\shell\src\server.ts | ||
const PORT = 5000; | ||
Adjust projects\mfe1\src\server.ts | ||
const PORT = 3000; | ||
ng build mfe1 && ng run mfe1:server | ||
node dist/mfe1/server/main.js | ||
ng build shell && ng run shell:server | ||
node dist/shell/server/main.js | ||
``` | ||
|
||
|