- Angular Tour of Heroes app converted to Nx monorepo
- Tutorial code from Lars Gyrup Brink Nielsen
- Note: to open web links in a new window use: ctrl+click on link
- Angular Router tutorial: tour of heroes used as starter code
- Nx uses a single repo for both frontend and backend apps with a shared library.
- Nx ensures that adding another app to the repo does not increase existing test or build times.
- Uses computational caching - so test and lint tasks are not repeated on unchanged code.
- Note: converted Nx app folder size is nearly 0.5 GB
- Nx with Angular plugin used to create project workspace
- Angular framework v12
- @nrwl/workspace v12 to transform the Angular CLI workspace to an Nx workspace
- rxjs v6 Reactive extensions library
- Nx Console: VS Code extension
- Install nx globally
- In app, install dependencies using
yarn
nx dep-graph
to see a diagram of the dependencies of your projects.yarn start
to start app on a dev. servernx serve
for a dev server. Frontend will open athttp://localhost:4200/
- refreshes on code changesnpx nx build nx-angular-router
Nest Backend:
npx nx serve api
to serve the backendnpx nx build api
to build the backendnpx nx test api
to test the backend
npx nx e2e todos-e2e --watch
for end to end testing of todos appnpx nx test
to test todos app - tests need fixing
- tba
- tba
- Status: Working.
- To-Do: Complete
- Lars Gyrup Brink Nielsen - Nx After Dark: Migrating an Angular CLI workspace to Nx
- Lars Gyrup Brink Nielsen - Nx After Dark: Extracting features into workspace libraries
- Lars Gyrup Brink Nielsen - Nx After Dark: Extracting workspace libraries from an Angular application
- Nx: Transitioning to Nx
- In Depth Dev: Shell Library patterns with Nx and Monorepo Architectures
- This project is licensed under the terms of the MIT license.
- Repo created by ABateman, email: gomezbateman@yahoo.com