Brijesh's Git Server — k3yst0n3 @ 47493b53290ea602660736c157d63e1fa708e704

server/main.go (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
package main

import (
	"k3yst0n3/database"

	"github.com/labstack/echo/v4"
	"github.com/labstack/echo/v4/middleware"
)

func main() {
	database.ConnectDb()

	e := echo.New()

	e.Use(middleware.Logger())
	e.Use(middleware.CORS())
	e.Use(middleware.RequestID())

	setupRoutes(e)

	e.Logger.Fatal(e.Start(":4000"))
}