Update go example, README

This commit is contained in:
Chuck Lantz
2019-04-19 13:16:41 -07:00
parent aafae304bf
commit 5066da6e19
7 changed files with 77 additions and 21 deletions

23
server.go Normal file
View File

@@ -0,0 +1,23 @@
/*----------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE in the project root for license information.
*---------------------------------------------------------------------------------------*/
package main
import (
"io"
"net/http"
"fmt"
)
func hello(w http.ResponseWriter, r *http.Request) {
io.WriteString(w, "Hello remote world!")
}
func main() {
portNumber := "9000"
http.HandleFunc("/", hello)
fmt.Println("Server listening on port ", portNumber)
http.ListenAndServe(":" + portNumber, nil)
}