mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-25 01:45:15 +00:00
27 lines
456 B
Go
27 lines
456 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
"os"
|
|
|
|
"git.m2.nz/go-scrobble/internal/goscrobble"
|
|
"github.com/joho/godotenv"
|
|
)
|
|
|
|
func main() {
|
|
err := godotenv.Load()
|
|
if err != nil {
|
|
log.Fatal("Error loading .env file")
|
|
}
|
|
|
|
// Store JWT secret
|
|
goscrobble.JwtToken = []byte(os.Getenv("JWT_SECRET"))
|
|
|
|
// // Boot up DB connection for life of application
|
|
goscrobble.InitDb()
|
|
defer goscrobble.CloseDbConn()
|
|
|
|
// Boot up API webserver \o/
|
|
goscrobble.HandleRequests()
|
|
}
|