mirror of
https://github.com/idanoo/GoScrobble
synced 2025-07-01 13:42:20 +00:00
Basic API structure
This commit is contained in:
parent
28d8d3491a
commit
529ac7ab84
9 changed files with 118 additions and 16 deletions
|
@ -1,10 +1,22 @@
|
|||
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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue