This project was generated using Nx🔎
This project is a MonoRepo + Typescript + Formik adaptation of the Building Applications with React and Redux Pluralsight Course by Cory House.
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.
Developing in Docker uses volumes to enable automatic reloading. You will need to enable file sharing in Docker Desktop.
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.
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)
Run npm run remove-docker-dev
or docker-compose down
Run nx g @nrwl/react:component my-component --project=courses-react
to generate a new component.
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.
Run docker-compose -f doccker-compose.prod.yml build
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.
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.
Run nx dep-graph
to see a diagram of the dependencies of your projects.
Visit the Nx Documentation to learn more. !
🔎 Nx is a set of Extensible Dev Tools for Monorepos.