mirror of
https://github.com/ZeroDream-CN/SakuraFrp
synced 2024-11-22 15:44:42 +00:00
16 lines
253 B
Go
16 lines
253 B
Go
|
package tests
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"net/http"
|
||
|
)
|
||
|
|
||
|
func StartHttpServer() {
|
||
|
http.HandleFunc("/", request)
|
||
|
http.ListenAndServe(fmt.Sprintf("0.0.0.0:%d", 10702), nil)
|
||
|
}
|
||
|
|
||
|
func request(w http.ResponseWriter, r *http.Request) {
|
||
|
w.Write([]byte(HTTP_RES_STR))
|
||
|
}
|