summaryrefslogblamecommitdiff
path: root/main.go
blob: 7ae5449dc7d954cab4654fc46e985c7bf709f089 (plain) (tree)
1
2
3
4
5
6
7
8
9

            






                                       

             



                                    

                          

                            





                                                                      
package main

import (
	"log"

	"git.devcara.com/hkgi/database"
	"github.com/gofiber/fiber/v2"
	"github.com/joho/godotenv"
)

func main() {
	err := godotenv.Load(".env")
	if err != nil {
		log.Fatal(err)
	}
	app := fiber.New()

	database.ConnectDB()

	app.Get("/", func(c *fiber.Ctx) error {
		return c.JSON(&fiber.Map{"data": "Hello from Fiber!"})
	})

	app.Listen(":6000")
}