-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathserver.go
More file actions
25 lines (20 loc) · 695 Bytes
/
Copy pathserver.go
File metadata and controls
25 lines (20 loc) · 695 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*----------------------------------------------------------------------------------------
* 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"
"io"
"net/http"
"github.com/microsoft/vscode-remote-try-go/hello"
)
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)
}