Dotnet run opens the wrong URL
After creating a new project with the template, running the command dotnet run results in my browser opening a tab with the url http://0.0.0.0:8085/. However this is the backend's URL. Shouldn't it open the client instead, at :8080?
The template stopped automatically opening a browser tab a while back because it's annoying while working on a project when you already have the browser tab ready to go.
Do you use Visual Studio? It creates launchSettings.json with "launchBrowser": true. This then causes dotnet to launch the browser on run. I'm not sure how to correct the port here but you can at least change launchBrowser to false.
Ahh must be the case yeah, I do indeed have a launchSettings.json file with "launchBrowser": true. Case solved. Maybe it would be better for the template to include a launcSettings.json where that setting is set to false?
@theprash I've seen this too. Either including a file that stops this happening, or including documentation to explain this, would be my suggestion.
I found a better fix for this issue than including a default file. You can add <NoDefaultLaunchSettingsFile>true</NoDefaultLaunchSettingsFile to Server.fsproj. I opened PR #523 to make this change to both default and minimal templates.
Actually cancel that (my last comment). If we remove the file then the environment is defaulted to Production while running in dev. So I've opened PR #524 to add launchSettings.json to the minimal template as well.