Skip to content

Commit

Permalink
Add route for root
Browse files Browse the repository at this point in the history
  • Loading branch information
Mupati committed Aug 8, 2021
1 parent 3356dcf commit 640de18
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,17 @@ func main() {

api := gin.Default()

api.GET("/", func(c *gin.Context) {
c.JSON(200, gin.H{
"message": "ok",
})
})

api.GET("rtc/:channelName/:role/:tokentype/:uid", getRtcToken)
api.GET("/rtm/:uid/", getRtmToken)
api.GET("/rte/:channelName/:role/:tokentype/:uid", getBothTokens)

api.Run(":8080")
// api.Run(":8080")
}

func getRtcToken(c *gin.Context) {
Expand Down

0 comments on commit 640de18

Please sign in to comment.