Skip to content

Pluralsight React with Redux sample app in an Nrwl workspace

Notifications You must be signed in to change notification settings

anAgent/courses-react-nx

 
 

Repository files navigation

Courses React Nx

Build Status Deployment Status

This project was generated using Nx🔎

Inspiration

This project is a MonoRepo + Typescript + Formik adaptation of the Building Applications with React and Redux Pluralsight Course by Cory House.

Development server

Run nx serve api and nx serve courses-react for a dev server. Alternatively you can run npm start. Navigate to http://localhost:4201/. The api dev server is available at http://localhost:3333/. The app will automatically reload if you change any of the source files.

Development in Docker

Developing in Docker uses volumes to enable automatic reloading. You will need to enable file sharing in Docker Desktop.

Development

Starting the Docker Containers

Run npm run start-docker-dev. This is the same as npm start only using docker containers to host the development servers. Navigate to http://localhost:4201/. The app will automatically reload if you change any of the source files.

You can optionally pass a -- -d argument which will start the containers in detached mode add give you back your console.

Stopping the Docker Containers

Stop the containers by sending Ctrl + C (Windows) and wait for them to exit.
or
Run npm run stop-docker-dev or docker-compose stop (if you passed the -- -d argument)

Removing the Docker Containers and Shared Network

Run npm run remove-docker-dev or docker-compose down

Code scaffolding

Run nx g @nrwl/react:component my-component --project=courses-react to generate a new component.

Build

Run nx build api and nx build courses-react to build the projects. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.

Build Docker Containers

Run docker-compose -f doccker-compose.prod.yml build

Running unit tests

Run nx test courses-react to execute the unit tests via Jest.

Run nx affected:test to execute the unit tests affected by a change.

Running end-to-end tests

Run ng e2e courses-react to execute the end-to-end tests via Cypress.

Run nx affected:e2e to execute the end-to-end tests affected by a change.

Understand your workspace

Run nx dep-graph to see a diagram of the dependencies of your projects.

Further help

Visit the Nx Documentation to learn more. !

🔎 Nx is a set of Extensible Dev Tools for Monorepos.

About

Pluralsight React with Redux sample app in an Nrwl workspace

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 90.5%
  • JavaScript 5.3%
  • Dockerfile 2.6%
  • HTML 1.2%
  • CSS 0.4%