I added the following section in project.json.
\"commands\": {
\"run\": \"run server.urls=http://localhost:8082\",
\"web\": \"Microsof
you can also code like this
IConfiguration config = new ConfigurationBuilder()
.AddCommandLine(args)
.Build();
var host = new WebHostBuilder()
.UseConfiguration(config)
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseStartup()
.Build();
and set up your application by command line :dotnet run --server.urls http://*:5555