You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
✨ [Feature request]: Set the PORT number dynamically on local server. #1243
Is your feature request related to a problem? Please describe.
When we try to create a new play on localhost and If we already have something running on port 3000 then the project successfully runs on a different port but when we hit the create play button it redirects to port 3000 which is not the intended port for the project.
Describe the solution you'd like.
The current solution wants us to set the port number in a .env file If we do that it will successfully open the new play form on that port but what I am suggesting is that we exclude the need to set an env variable for this specific purpose.
Describe alternatives you've considered.
none
Screenshot / Screenshare
inside CreatePaly file
This is the code that needs to be updated/
Hey! contributor, thank you for opening an Issue 🎉.
@reactplay/maintainers will review your submission soon and give you helpful feedback.
If you're interested in continuing your contributions to open source and want to be a part of a welcoming and fantastic community, we invite you to join our ReactPlay Discord Community.
Show your support by starring ⭐ this repository. Thank you and we appreciate your contribution to open source! Stale Marking : After 30 days of inactivity this issue/PR will be marked as stale issue/PR and it will be closed and locked in 7 days if no further activity occurs.
Be careful with this. You can start your app on port 3000. But process.env is not found for x reason, so you can't found process.env.RAECT_DEV_PORT logically.
And if all is ok with process.env, this variable is not set in .env file, so it's logic it will not be found.
This variable is never used in the application, so it always default to 3000 and it's the port use by cra, so the main app works without problem with this.
By default CRA starts on port 3000 even if you change this variable.
You can add the port in the start script but will need to be done in the main app.
Best solution for you is to use command line with a tool like "kill-port"
Here how i use the application on local "npx kill-port 3000 && pnpm start" or other package manager.
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a 👍 Because this issue is marked as stale, it will be closed and locked in 7 days if no further activity occurs. Thank you for your contributions!
Activity
github-actions commentedon Sep 12, 2023
Hey! contributor, thank you for opening an Issue 🎉.
@reactplay/maintainers will review your submission soon and give you helpful feedback. If you're interested in continuing your contributions to open source and want to be a part of a welcoming and fantastic community, we invite you to join our ReactPlay Discord Community.
Show your support by starring ⭐ this repository. Thank you and we appreciate your contribution to open source!
Stale Marking : After 30 days of inactivity this issue/PR will be marked as stale issue/PR and it will be closed and locked in 7 days if no further activity occurs.
Hat52 commentedon Sep 12, 2023
If this needs to be worked on then I would like to work on it.
Hat52 commentedon Sep 12, 2023
The attached screenshot has the port number 3001, I have changed that on local from 3000 to 3001
atapas commentedon Sep 20, 2023
Please work on it.
Angra974 commentedon Sep 20, 2023
Be careful with this. You can start your app on port 3000. But process.env is not found for x reason, so you can't found process.env.RAECT_DEV_PORT logically.
And if all is ok with process.env, this variable is not set in .env file, so it's logic it will not be found.
This variable is never used in the application, so it always default to 3000 and it's the port use by cra, so the main app works without problem with this.
By default CRA starts on port 3000 even if you change this variable.
You can add the port in the start script but will need to be done in the main app.
Best solution for you is to use command line with a tool like "kill-port"
Here how i use the application on local "npx kill-port 3000 && pnpm start" or other package manager.
Hat52 commentedon Sep 20, 2023
Thanks for heads up
github-actions commentedon Oct 20, 2023
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a 👍 Because this issue is marked as stale, it will be closed and locked in 7 days if no further activity occurs. Thank you for your contributions!