streamengine-core/main.go

26 lines
No EOL
488 B
Go

package main
import (
"fmt"
"net/http"
"git.kakio.us/kakious/streamengine-core/config"
"github.com/gin-gonic/gin"
)
func main() {
config := config.GetConfig()
// print the value of the key "port"
// in the config.yaml file
fmt.Println(config.GetString("port"))
r := gin.Default()
r.GET("/ping", func(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{
"message": "pong",
})
})
r.Run() // listen and serve on 0.0.0.0:8080 (for windows "localhost:8080")
}