title: what's the simplest web server code using asp.net core?
body: <p>I'm trying to learn asp.net core, but I found the examples are way too much complicated for me. Even for the new project created by templates, I see dependency injection, MVC, entity framework. I just want to write a simplest code using asp.net core and just output some hello world on web browser.</p>
  
  <p>By 'simplest', I mean something like this in golang:</p>
  
  <pre><code>package main
  
  import (
      "fmt"
      "net/http"
  )
  
  func handler(w http.ResponseWriter, r *http.Request) {
      fmt.Fprintf(w, "Hi there, I love %s!", r.URL.Path[1:])
  }
  
  func main() {
      http.HandleFunc("/", handler)
      http.ListenAndServe(":8080", nil)
  }
  </code></pre>
  
  <p>The reason I like the code is that I can see that I should begin with net/http module and see what happens by the method of HandleFunc. 
  The reason I hate current asp.net core examples is that I'm overwhelmed by so much new assemblies and classes at one time.</p>
  
  <p>Could anyone show me a simple example, or a link to at simple example so that I can learn new concepts in asp.net core one by one?</p>