Skip to content
Open
Changes from all 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 redisinsight/ui/vite.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default defineConfig({
},
},
server: {
port: 8080,
port: parseInt(process.env.RI_UI_DEV_PORT, 10) || 8080,
Comment thread
ArtemHoruzhenko marked this conversation as resolved.
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Contributor Author

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.

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Contributor Author

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.

fs: {
allow: ['..', '../../node_modules/monaco-editor', 'static', 'defaults'],
},
Expand Down
Loading