Skip to content

suunavier/dotnet-gitpod

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

ASP.NET Core 3 Application

During this workshop you will learn how to scaffold an ASP.NET core application.

Source MS

Create a web app project from the command lines

Using the command line you can create a new web app:

$ dotnet new webapp -o aspnetcoreapp

Start the app

  • Expected behavior is that it will open an example ASP.NET application when you run the following commands:
$ cd aspnetcoreapp
$ dotnet run --urls http://0.0.0.0:5001 

Browse to localhost:5001 and you should see the webpage.

Setup GitPod to run your app by default

In the .gitpod.yaml file you can uncomment out the lines 11-12:

tasks:
  - command: cd aspnetcoreapp/ && dotnet run --urls http://0.0.0.0:5001

Your application will now start automatically when Gitpod launches.

Edit a Razor page

Open Pages/Index.cshtml and modify and save the page with the following highlighted markup:

@page
@model IndexModel
@{
    ViewData["Title"] = "Home page";
}

<div class="text-center">
    <h1 class="display-4">Welcome</h1>
    <p>Hello, world! The time on the server is @DateTime.Now</p>
</div>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 90.8%
  • HTML 6.4%
  • CSS 2.4%
  • JavaScript 0.4%