Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated yarn start in root package.json #1271

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"prepare": "husky install",
"postinstall": "patch-package",
"ci": "turbo run lint build test",
"start": "turbo run start --parallel",
"start": "turbo run start --parallel --filter=app --filter=backend",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Knowing that starting the frontend separately from the backend will not manager dynamic plugin config scehams correctly, due to webpack being used (if it is still the case), we might even want to replace the start command by:

turbo run build --filter=app && turbo run start --filter=backend

That builds the frontend app and thus also generates the frontend app static assets.
Then the backend app, detecting the static assets, serves the frotnend application through the app-backend plugin.
This has the double advantage of:

  • automatically serving the frontend app as part of the backend
  • Correctly serve to the frontend app the app config files of all the dynamic plugins known by the backend.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok confirmed that it works, However had to update the app-config.yaml a bit. I had to update the app.baseUrl to http://localhost:7007 and the remove the backend.cors.origin line since I don't think it would be needed anymore.
cc @04kash

"start-backend": "turbo run start --filter=backend",
"build": "turbo run build",
"tsc": "tsc",
Expand Down
Loading