Simplify folder structure

This commit is contained in:
Alexander Krieg
2019-06-15 13:38:07 +00:00
parent ded18bad50
commit b6cda78c17
2 changed files with 1 additions and 1 deletions

24
src/main/server.go Normal file
View File

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