mirror of
https://github.com/snowykami/server-status-server.git
synced 2025-09-06 03:56:26 +00:00
✨ first comm
This commit is contained in:
22
service/config.go
Normal file
22
service/config.go
Normal file
@ -0,0 +1,22 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"github.com/LiteyukiStudio/go-logger/log"
|
||||
"github.com/joho/godotenv"
|
||||
"os"
|
||||
)
|
||||
|
||||
var (
|
||||
Token = "server-status-be-q2dw9adh8"
|
||||
)
|
||||
|
||||
func init() {
|
||||
err := godotenv.Load(".env")
|
||||
if err != nil {
|
||||
log.Info("Error loading .env file")
|
||||
}
|
||||
token := os.Getenv("TOKEN")
|
||||
if token != "" {
|
||||
Token = token
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user