Skip to content
This repository was archived by the owner on Sep 21, 2018. It is now read-only.
This repository was archived by the owner on Sep 21, 2018. It is now read-only.

Change templates to use environment variable for urls. #574

Closed
@glennc

Description

@glennc

This will allow the Docker tools team to not modify user code after a new app is created.

var urls = Environment.GetEnvironmentVariable("ASPNETCORE_URLS") ?? "http://localhost:5000";
var host = new WebHostBuilder()
            .UseUrls(urls)
            .UseKestrel()
            .UseContentRoot(Directory.GetCurrentDirectory())
            .UseIISIntegration()
            .UseStartup<Startup>()
            .Build();

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions