1.5 KiB
1.5 KiB
title | author | ms.author | manager | ms.date | ms.topic | ms.assetid | ms.prod | uid |
---|---|---|---|---|---|---|---|---|
Getting Started | rick-anderson | riande | wpickett | 10/14/2016 | article | 73543e9d-d9d5-47d6-9664-17a9beea6cd3 | aspnet-core | getting-started |
Getting Started
-
Install .NET Core
-
Create a new .NET Core project:
mkdir aspnetcoreapp cd aspnetcoreapp dotnet new
-
Update the project.json file to add the Kestrel HTTP server package as a dependency:
[!code-csharpMain]
-
Restore the packages:
dotnet restore
-
Add a Startup.cs file that defines the request handling logic:
[!code-csharpMain]
-
Update the code in Program.cs to setup and start the Web host:
[!code-csharpMain]
-
Run the app (the
dotnet run
command will build the app when it's out of date):dotnet run
-
Browse to http://localhost:5000: