refactor(backend): changes to have a catch all and not return a 404 always
This commit is contained in:
@@ -11,7 +11,12 @@ func main() {
|
||||
fmt.Println("Welcome to lst backend where all the fun happens.")
|
||||
r := gin.Default()
|
||||
|
||||
r.GET("/", errorLoc)
|
||||
|
||||
r.GET("/api/ping", func(c *gin.Context) {
|
||||
c.JSON(200, gin.H{"message": "pong"})
|
||||
})
|
||||
|
||||
r.Any("/", errorLoc)
|
||||
r.Run(":8080")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user