|
1 | | - |
2 | | - |
3 | 1 | # NX NestJS React starter |
4 | 2 |
|
| 3 | +Bootstrapped, ready-for-production (Mono-)Repository for TypeScript environments using NestJS + React. |
5 | 4 | This project was generated using [Nx](https://nx.dev). |
6 | 5 |
|
7 | | -<p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="450"></p> |
8 | | - |
9 | 6 | 🔎 **Smart, Extensible Build Framework** |
10 | 7 |
|
11 | 8 | ## Project setup / initialization |
12 | | -This project setup was created by executing folling steps |
13 | | - |
14 | | -1) install nx globally `npm i nx` |
15 | | -2) initialize new nx workspace with default react-app |
16 | | -`npx create-nx-workspace@latest nx-nestjs-react-starter` |
17 | | -3) use package manager of choice to install dependency for NestJS |
18 | | -`yarn add -D @nrwl/nest` |
19 | | -`npm install -D @nrwl/nest` |
20 | 9 |
|
21 | | -4) add a new nestjs app to the workspace |
22 | | -`npx nx g @nrwl/nest:app api --frontendProject=client` |
| 10 | +This project setup was created by executing folling steps |
23 | 11 |
|
24 | | -5) add a shared library |
25 | | -`nx g @nrwl/node:library mylib` |
| 12 | +- install nx globally `npm i nx` |
| 13 | +- install dependencies `npm install` or `npm i` |
26 | 14 |
|
| 15 | +### adjust package.json |
27 | 16 |
|
28 | | -### adjust package.json |
29 | 17 | support linting and testing for all applications at once |
30 | 18 | `"test": "npx nx run-many --all --target=test --parallel"` |
31 | 19 | `"lint": "nx workspace-lint && npx nx run-many --all --target=lint --parallel"` |
32 | 20 |
|
33 | 21 | add separate run & build scripts for backend and frontend |
34 | | -`"start:client": "nx run client:serve"` |
| 22 | +`"start:client": "nx run client:serve"` |
35 | 23 | `"start:api": "nx run api:serve"` |
36 | 24 |
|
37 | 25 | ## Adding capabilities to your workspace |
@@ -68,7 +56,7 @@ Libraries are shareable across libraries and applications. They can be imported |
68 | 56 |
|
69 | 57 | ## Development server |
70 | 58 |
|
71 | | -Run `nx serve client` for a frontend dev server. Navigate to http://localhost:4200/. |
| 59 | +Run `nx serve client` for a frontend dev server. Navigate to http://localhost:4200/. |
72 | 60 | Run `nx serve api` for a backend dev server. Navigate to http://localhost:3333/api. |
73 | 61 | The app will automatically reload if you change any of the source files. |
74 | 62 |
|
|
0 commit comments