-
Notifications
You must be signed in to change notification settings - Fork 432
RI-000: add possibility to run multiple UI #5416
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
base: main
Are you sure you want to change the base?
RI-000: add possibility to run multiple UI #5416
Conversation
|
Hi, I’m Jit, a friendly security platform designed to help developers build secure applications from day zero with an MVS (Minimal viable security) mindset. In case there are security findings, they will be communicated to you as a comment inside the PR. Hope you’ll enjoy using Jit. Questions? Comments? Want to learn more? Get in touch with us. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
| }, | ||
| server: { | ||
| port: 8080, | ||
| port: parseInt(process.env.RI_UI_DEV_PORT, 10) || 8080, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use helper function IMO, some less experienced users may try to start the app with ports less than 1000 and get errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, isn't there an option to make it so that vite choses next port if current is occupied?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should to automate this, imo it should be under developer control. Moreover since it is developer command - I don't think we need to even validate it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is automatic out of the box - https://vite.dev/config/server-options#server-port
But I guess having this option does not harm if someone wants to use it
| }, | ||
| server: { | ||
| port: 8080, | ||
| port: parseInt(process.env.RI_UI_DEV_PORT, 10) || 8080, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't RI_UI_DEV_PORT be added in some env.example file at least?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't have some env.example file atm. we can add it if needed for needed envs.
What
Just tech changes. Added possibility to run UI on specified port via env variable. So we can run both UI and API from different folders at the same time when each will live on own ports
Testing
Note
Allows running multiple UI instances or customizing the dev port.
vite.config.mjsto setserver.portfromRI_UI_DEV_PORTwith fallback to8080Written by Cursor Bugbot for commit e8ead74. This will update automatically on new commits. Configure here.