1 Star 0 Fork 0

houmingzhang/mycommand

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
sserver.go 700 Bytes
一键复制 编辑 原始数据 按行查看 历史
houmingzhang 提交于 2020-10-26 10:44 +08:00 . d
package main
import (
"fmt"
"log"
"net/http"
"os"
)
func main() {
p, _ :=os.Getwd()
fmt.Println(p)
http.Handle("/", http.FileServer(http.Dir(p)))
log.Printf("About to listen on 10443. Go to https://127.0.0.1:10443/")
// One can use generate_cert.go in crypto/tls to generate cert.pem and key.pem.
// ListenAndServeTLS always returns a non-nil error.
// err := http.ListenAndServeTLS(":10443", "/usr/bin/mycommand/cert.pem", "/usr/bin/mycommand/key.pem", nil)
err := http.ListenAndServeTLS(":10443", "/root/OpenMind/mediasoup/mediasoup-demo/server/certs/server.pem", "/root/OpenMind/mediasoup/mediasoup-demo/server/certs/server.key.pem", nil)
log.Fatal(err)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Shell
1
https://gitee.com/dtrylzhm/mycommand.git
git@gitee.com:dtrylzhm/mycommand.git
dtrylzhm
mycommand
mycommand
master

搜索帮助