You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project was generated using [Nx](https://nx.dev).
@@ -18,89 +12,143 @@ These capabilities include generating applications, libraries, etc as well as th
18
12
19
13
Below are our core plugins:
20
14
21
-
-[React](https://reactjs.org)
22
-
-`npm install --save-dev @nrwl/react`
23
-
-Web (no framework frontends)
24
-
-`npm install --save-dev @nrwl/web`
25
-
-[Angular](https://angular.io)
26
-
-`npm install --save-dev @nrwl/angular`
27
-
-[Nest](https://nestjs.com)
28
-
-`npm install --save-dev @nrwl/nest`
29
-
-[Express](https://expressjs.com)
30
-
-`npm install --save-dev @nrwl/express`
31
-
-[Node](https://nodejs.org)
32
-
-`npm install --save-dev @nrwl/node`
15
+
-[React](https://reactjs.org)
16
+
-`npm install --save-dev @nrwl/react`
17
+
- Web (no framework frontends)
18
+
-`npm install --save-dev @nrwl/web`
19
+
-[Angular](https://angular.io)
20
+
-`npm install --save-dev @nrwl/angular`
21
+
-[Nest](https://nestjs.com)
22
+
-`npm install --save-dev @nrwl/nest`
23
+
-[Express](https://expressjs.com)
24
+
-`npm install --save-dev @nrwl/express`
25
+
-[Node](https://nodejs.org)
26
+
-`npm install --save-dev @nrwl/node`
33
27
34
28
There are also many [community plugins](https://nx.dev/community) you could add.
35
29
36
-
## Notice
30
+
## Code scaffolding
37
31
38
-
**In production build MFE will be don`t work correctly, because MfeOutletDirective create component dynamically.**
32
+
Run `nx g @nrwl/angular:component my-component --project=my-app` to generate a new component.
39
33
40
-
The production build runs an optimizer that strips the needed information.
41
-
You could turn off AOT (check the angular.json configuration) and in this case the module and components will be compiled and runtime.
42
-
But still, when built for production, the names of the components will be minified.
34
+
## Build
43
35
44
-
## Generate an MFE application
36
+
Run `nx build my-app` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
45
37
46
-
**This project has custom nx generator to automate the creation of MFE applications.**
38
+
## Running unit tests
47
39
48
-
Run `nx workspace-generator mfe my-mfe` to generate an MFE application.
40
+
Run `nx test my-app` to execute the unit tests via [Jest](https://jestjs.io).
49
41
50
-
> You can select that type of MFE you want to create - host or remote
42
+
Run `nx affected:test` to execute the unit tests affected by a change.
51
43
52
-
## Generate an application
44
+
## Running end-to-end tests
53
45
54
-
Run `nx g @nrwl/angular:app my-app` to generate an application.
46
+
Run `ng e2e my-app` to execute the end-to-end tests via [Cypress](https://www.cypress.io).
55
47
56
-
> You can use any of the plugins above to generate applications as well.
48
+
Run `nx affected:e2e` to execute the end-to-end tests affected by a change.
57
49
58
-
When using Nx, you can create multiple applications and libraries in the same workspace.
50
+
## Understand your workspace
59
51
60
-
## Generate a library
52
+
Run `nx dep-graph` to see a diagram of the dependencies of your projects.
61
53
62
-
Run `nx g @nrwl/angular:lib my-lib` to generate a library.
54
+
## Further help
63
55
64
-
> You can also use any of the plugins above to generate libraries as well.
56
+
Visit the [Nx Documentation](https://nx.dev) to learn more.
65
57
66
-
Libraries are shareable across libraries and applications. They can be imported from `@nx-mfe/my-lib`.
58
+
---
67
59
68
-
## Development host app
60
+
## Backend
69
61
70
-
Run `nx serve client-shell-app` for a dev host app. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
Run `nx serve client-auth-mfe` for a dev MFE. Navigate to http://localhost and the port specified in workspace.json or angular.json. The app will automatically reload if you change any of the source files.
66
+
Password: qwerty78!
75
67
76
-
##Development server
68
+
### Variants of running microservices in Docker
77
69
78
-
Run `nx serve server` for a dev server. Navigate to http://localhost:3000/. The app will automatically reload if you change any of the source files.
70
+
---
79
71
80
-
##Code scaffolding
72
+
#### Development mode:
81
73
82
-
Run `nx g @nrwl/angular:component my-component --project=my-app` to generate a new component.
**In production build MFE will be don`t work correctly, because MfeOutletDirective create component dynamically.**
119
+
120
+
The production build runs an optimizer that strips the needed information.
121
+
You could turn off AOT (check the angular.json configuration) and in this case the module and components will be compiled and runtime.
122
+
But still, when built for production, the names of the components will be minified.
123
+
124
+
### Generate an MFE application
125
+
126
+
**This project has custom nx generator to automate the creation of MFE applications.**
127
+
128
+
Run `nx workspace-generator mfe my-mfe` to generate an MFE application.
129
+
130
+
> You can select that type of MFE you want to create - host or remote
131
+
132
+
### Generate an application
133
+
134
+
Run `nx g @nrwl/angular:app my-app` to generate an application.
135
+
136
+
> You can use any of the plugins above to generate applications as well.
137
+
138
+
When using Nx, you can create multiple applications and libraries in the same workspace.
139
+
140
+
### Generate a library
141
+
142
+
Run `nx g @nrwl/angular:lib my-lib` to generate a library.
143
+
144
+
> You can also use any of the plugins above to generate libraries as well.
145
+
146
+
Libraries are shareable across libraries and applications. They can be imported from `@nx-mfe/my-lib`.
147
+
148
+
### Development host app
149
+
150
+
Run `nx serve client-shell-app` for a dev host app. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
151
+
152
+
### Development MFE app
153
+
154
+
Run `nx serve client-auth-mfe` for a dev MFE. Navigate to http://localhost and the port specified in workspace.json or angular.json. The app will automatically reload if you change any of the source files.
0 commit comments