这是indexloc提供的服务,不要输入任何密码
Skip to content

jeffbcross/workshop-nx-labs

 
 

Repository files navigation

Lab Instructions for Nx Workshop

Here are the labs for the Git repos: workshop-nx-starter

Organizing Code in a Workspace

For your local repository, checkout branch m2start:

  1. Create an App and a Lib
  2. Create a Lazy Loaded UI Lib
  3. Public APIs for Libs
  4. Run the Build Command and NPM Scripts

RxJS

For your local repository, checkout branch m3start:

  1. Add Subscriptions to Ticket Search Form
  2. Throttle Assigned to User Field and Transform
  3. Use SwitchMap
  4. Create a Ticket Timer Observable
  5. Track Tickets to Work With a Multi-Cast Observable

Building Blocks of NgRx

For your local repository, checkout branch m5start:

  1. Create a Root State for Logs
  2. Refactor Tickets State to Use Key/Value Object
  3. Refactor Tickets State to use NgRx Entity
  4. Create a Feature State for Ticket Comments


Running the Application

Run the following command(s) in individual terminals:

npm run server
npm run customer-portal

If you already have one(s) running and you need to restart, you can stop the run with ctrl+c.



Using the HTTP REST Server

Confirm the Node Server is running with browser page: http://localhost:3000/api/tickets. Use terminal command to launch the server if needed: npm run server.

You can easily throttle the server responses with random delays using npm run server -- -throttled


screen shot 2018-05-21 at 7 14 38 am

To see the server HELP page (with links), navigate to http://localhost:3000/.

screen shot 2018-05-20 at 8 54 39 pm

Restarting the App Server

Sometimes a change to TypeScript interfaces or adding new *.ts files will not get picked up by the watch processes. In such cases, you may need to stop/restart these... if you feel your code is correct but you are getting an error.

If you already have one(s) running and you need to restart, you can stop the run with ctrl+c.

About

Lab exercises for the Nx Enterprise workshop(s)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published