Comments (3)
Hey @RogerGL great inquiries and suggestions. We will have some documentation and guides to explain more coming soon. But here are some answers for you now.
One of the powerful things about the libs structure is the ease of encapsulating stuff within NgModule
chunks, keeping focus on small pieces. Instead of creating those within a single app, it is trivial to organize those in libs in the Nx Workspace
and just consume them in the app. This sets you up to easily reuse those when you add more apps (among other advantages).
The ng serve
of the first app in the list is a behavior of the Angular CLI. The port number or url to serve for each app is something that can be handled with the Angular CLI functionality. You can set up npm scripts to make serving individual apps easier:
package.json
{
. . .
"scripts" {
. . .
"serve:app1": "ng serve -a=app1 --port=4201",
"serve:app2": "ng serve -a=app2 --port=4202",
. . .
}
. . .
}
that can be run via:
npm run serve:app1
This is a little more of an Angular CLI usage thing than a Nx thing, but there is probably some potential there for Nx to maybe make this setup easier. Guess it will depend on how opinionated Nx will be out of the box vs more flexibility.
from nx.
Thanks a lot for your kind reply. I'm really happy that there is an effort to provide some guidelines for large scale JS-Enterprise projects.
from nx.
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
from nx.
Related Issues (20)
- MuiComponents in Remote app cause Cannot read properties of null (reading 'useContext') error
- Nx launches only 1st target of dependsOn when using custom plugin in v18-v19 HOT 2
- bug(devkit): `formatFiles` uses prettier v3 async api in context with prettier v2 which causes intermittent pipeline failures within tests
- nx migrate skip lock files in the commits
- @nx/expo project fails when running @nx/eslint HOT 2
- add more info about {projectRoot}, {workspaceRoot} etc keywords HOT 2
- @nx/js:tsc fails to declare proper export on 'index' file in 'additionalEntryPoints'
- Official docs still recommend obsolete @nx/aws-lambda, which is now unmaintained and doesn't work
- `ProjectsWithNoNameError` error after updating to v19
- skipRemotes option broken when a remote does not live in the same workspace as the host
- @nx/js:tsc force changed my package type from "module" to "commonjs"
- nx:run-commands executor ignore envFile option
- Nx run lint is verbose
- Cypress component testing restricts executor after migrating to 19 from 17 HOT 1
- Handling CTRL+C (SIGINT) in an executor does not work anymore after upgrading NX
- nx g lib creates invalid dependencies in package.json HOT 2
- nx is not supported on ppc64le (power architecture) HOT 1
- I am getting error after upgrading expo version to latest that is 51 and react-native to 74 HOT 1
- "implicitDependencies" option adds every project as implicit dependency HOT 1
- Installation doesn't work on multi-user computers HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nx.