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. |
| }, | ||
| server: { | ||
| port: 8080, | ||
| port: parseInt(process.env.RI_UI_DEV_PORT, 10) || 8080, |
There was a problem hiding this comment.
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.
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.
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.
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.
shouldn't RI_UI_DEV_PORT be added in some env.example file at least?
There was a problem hiding this comment.
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.