This is the problem with trying to be clever with your default ports: someone else already thought of it.
1337 is cool and all, but already in use, just like 5432 and 3306 etc. The latter ports were carefully chosen to avoid conflicts.
Using a round default number, above not just 1024, but 2048, like 3000 or 5000 should only conflict with with other local development projects that can be disabled.
All my projects that try a default port (usually 3000 and/or 3333), they recursively try/catch and generate a random port in the 20k ranges at least once or twice before actually failing so tests still work with the app running.
Sometimes it’s better to be compatible than clever.
I also tried using 3000 in the ENV file but the web app still looks at 1337… seems like only part of the app reads the env variable.
What is the solution here for developing locally on windows (other than uninstalling all my Razer software)?
Is there a fix planned for the PORT variable not working properly?
As a workaround I was able to:
- shut down my Razer apps
- open an admin PowerShell (req. for the last step)
- netstat -ano | findstr :1337
- taskkill /F /PID ( resulting PID from last command )
You’ll likely have to repeat steps 3 and 4 when the service gets relaunched.