You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
458 B
24 lines
458 B
package main
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"log"
|
|
)
|
|
|
|
func main(){
|
|
r := gin.Default()
|
|
r.GET("/hello", func(context *gin.Context) {
|
|
log.Println(">>>> hello gin start <<<<")
|
|
context.JSON(200,gin.H{
|
|
"code":200,
|
|
"success":true,
|
|
})
|
|
})
|
|
//M3u8目录
|
|
// http://127.0.0.1:9000/M3u8/B7/B7318F5D-46B8-4AA1-8811-1A9D65528E19/B7318F5D-46B8-4AA1-8811-1A9D65528E19.m3u8
|
|
r.Static("/M3u8", "./Target")
|
|
|
|
// 指定地址和端口号
|
|
r.Run(":9000")
|
|
}
|