Skip to content

Add Port to Playground Server Configuration#1624

Merged
johbaxter merged 1 commit intodevfrom
fix-playground-server-interference-with-client-server
Jul 31, 2025
Merged

Add Port to Playground Server Configuration#1624
johbaxter merged 1 commit intodevfrom
fix-playground-server-interference-with-client-server

Conversation

@j-adam-connor
Copy link
Copy Markdown
Contributor

Description

This pull request specifies the port for the playground server in its configuration file in order to prevent it from interfering with the client server when running pnpm run dev.

Changes Made

  • Added port: 5174 to the server object in the playground Vite configuration file.

How to Test

  1. Run pnpm run dev from the app root.
  2. Wait for all packages to build. (This can take several minutes).
  3. Verify that the client server is running (http://localhost:5173/SemossWeb/packages/client/dist/#)
  4. Verify that the playground server is running (http://localhost:5174/#/new)

@j-adam-connor j-adam-connor requested a review from a team as a code owner July 30, 2025 22:12
@github-actions
Copy link
Copy Markdown

@CodiumAI-Agent /describe

@QodoAI-Agent
Copy link
Copy Markdown

Title

Add Port to Playground Server Configuration


User description

Description

This pull request specifies the port for the playground server in its configuration file in order to prevent it from interfering with the client server when running pnpm run dev.

Changes Made

  • Added port: 5174 to the server object in the playground Vite configuration file.

How to Test

  1. Run pnpm run dev from the app root.
  2. Wait for all packages to build. (This can take several minutes).
  3. Verify that the client server is running (http://localhost:5173/SemossWeb/packages/client/dist/#)
  4. Verify that the playground server is running (http://localhost:5174/#/new)

PR Type

Bug fix


Description

  • Specify explicit port for playground server

  • Prevent port conflict with client server


File Walkthrough

Relevant files
Configuration changes
vite.config.ts
Set explicit playground server port                                           

packages/playground/vite.config.ts

  • Added port: 5174 to server config
+1/-0     

@github-actions
Copy link
Copy Markdown

@CodiumAI-Agent /review

@QodoAI-Agent
Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ No major issues detected

@github-actions
Copy link
Copy Markdown

@CodiumAI-Agent /improve

@QodoAI-Agent
Copy link
Copy Markdown

PR Code Suggestions ✨

CategorySuggestion                                                                                                                                    Impact
General
Use env variable for port

Allow the port to be configured via an environment variable with a fallback to avoid
hard-coding and improve flexibility. Use parseInt to ensure the environment value is
a number.

packages/playground/vite.config.ts [27]

-port: 5174,
+port: parseInt(process.env.PORT || '5174', 10),
Suggestion importance[1-10]: 7

__

Why: Using process.env.PORT with a fallback avoids hard-coding the port and ensures it's parsed as a number, improving flexibility.

Medium
Enforce strict port binding

Add strictPort: true so the server errors if the desired port is already in use
instead of silently picking another port. This prevents unexpected port changes.

packages/playground/vite.config.ts [27]

 port: 5174,
+strictPort: true,
Suggestion importance[1-10]: 6

__

Why: Adding strictPort: true ensures the server errors if the port is occupied, preventing silent port changes and unexpected behavior.

Low

@johbaxter johbaxter merged commit 3807c4c into dev Jul 31, 2025
4 checks passed
@johbaxter johbaxter deleted the fix-playground-server-interference-with-client-server branch July 31, 2025 02:59
@github-actions
Copy link
Copy Markdown

@CodiumAI-Agent /update_changelog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants