User-474980206 posted
It’s up to use to decide. The command line arg are passed to the main. Common convent is if want it as an option it’s
-<single letter>:<value>
—<multiple letters>:<value>
say
myapp -p:8080
myapp —port:8080
You of course write a simple parser and pass the value to the port declaration code.
note: all asp.net core webapi apps are command line apps. See program.cs to access args