mirror of
https://github.com/fatedier/frp.git
synced 2025-08-02 16:21:38 +07:00
test: add function testing case
This commit is contained in:
20
test/http_server.go
Normal file
20
test/http_server.go
Normal file
@ -0,0 +1,20 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
var (
|
||||
PORT int64 = 10702
|
||||
HTTP_RES_STR string = "Hello World"
|
||||
)
|
||||
|
||||
func main() {
|
||||
http.HandleFunc("/", request)
|
||||
http.ListenAndServe(fmt.Sprintf("0.0.0.0:%d", PORT), nil)
|
||||
}
|
||||
|
||||
func request(w http.ResponseWriter, r *http.Request) {
|
||||
w.Write([]byte(HTTP_RES_STR))
|
||||
}
|
Reference in New Issue
Block a user