Skip to content
Simple web quickstart
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
animated
networking
.gitignore
README.md
dup1.go
dup2.go
dup3.go
echo2.go
inputlines.txt
server.go

README.md

golang-web

Simple GO language web quickstart

@author jayAtWorkerBee

Source initially looks something like this below >>>

$ cat server.go package main

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

func main() {

    http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
            fmt.Fprintf(w, "Hello, %q", html.EscapeString(r.URL.Path))
    })

    http.HandleFunc("/hi", func(w http.ResponseWriter, r *http.Request) {
            fmt.Fprintf(w, "Hi")
    })

    log.Fatal(http.ListenAndServe(":8081", nil))

}

To RUN $ go run server.go

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.