mirror of
https://github.com/wahyd4/go-shopping.git
synced 2026-08-09 04:35:51 +10:00
22 lines
353 B
Go
22 lines
353 B
Go
package main
|
|
|
|
import "github.com/gin-gonic/gin"
|
|
import _ "github.com/jinzhu/gorm/dialects/postgres"
|
|
|
|
func init() {
|
|
|
|
}
|
|
|
|
func main() {
|
|
r := gin.Default()
|
|
r.GET("/health", func(c *gin.Context) {
|
|
c.JSON(200, gin.H{
|
|
"message": "Everything is OK",
|
|
})
|
|
})
|
|
r.GET("/api/products", func(c *gin.Context) {
|
|
c.JSON(200, make([]string, 0))
|
|
})
|
|
r.Run()
|
|
}
|