Skip to content

Commit

Permalink
5. Add option to run multiple projects
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Połubiński committed Feb 27, 2023
1 parent 2bcf487 commit 3cd4386
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
22 changes: 21 additions & 1 deletion README.md
Expand Up @@ -29,4 +29,24 @@
`npm i --save @nrwl/storybook --legacy-peer-deps`
`npx nx g @nrwl/storybook:configuration figa-ui --uiFramework=@storybook/react`

Running: `npx nx run figa-ui:storybook`
## Run commands

`cd .\system\`

Storybook for figa-ui: `npx nx run figa-ui:storybook`
Next.js app for blog content: `npx nx serve blog`
React SPA app for blog management: `npx nx serve blog-creator`
Running dedicated apps: `npx nx run-many --parallel --target=serve --projects=blog,blog-creator`
Running all apps: `npx nx run-many --target=serve --all`

> Remember to add different port numbers if you want to run more than 1 application in the same time in **project.json** files.
```json
"serve": {
"options": {
"buildTarget": "blog:build",
"dev": true,
"port": 3001
},
}
```
3 changes: 2 additions & 1 deletion system/apps/blog-creator/project.json
Expand Up @@ -52,7 +52,8 @@
"defaultConfiguration": "development",
"options": {
"buildTarget": "blog-creator:build",
"hmr": true
"hmr": true,
"port": 3002
},
"configurations": {
"development": {
Expand Down
3 changes: 2 additions & 1 deletion system/apps/blog/project.json
Expand Up @@ -24,7 +24,8 @@
"defaultConfiguration": "development",
"options": {
"buildTarget": "blog:build",
"dev": true
"dev": true,
"port": 3001
},
"configurations": {
"development": {
Expand Down

0 comments on commit 3cd4386

Please sign in to comment.