summaryrefslogtreecommitdiff
path: root/server.go
blob: 5b76fa374894a653246642333bb2ac9271f4542a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package main

import (
  "fmt"
  "log"
  "net/http"
)

func root( w http.ResponseWriter, r *http.Request) {
  fmt.Fprintf(w, "It's the root ! [%s]{{%s}}", r.URL.Path[1:], r.Method)
}

func main() {
  http.HandleFunc("/", root)
  log.Fatal(http.ListenAndServe(":8080", nil))
}