added docker compose to run everything in one go
This commit is contained in:
15
main.go
15
main.go
@@ -15,25 +15,18 @@ import (
|
||||
. "git.andr3h3nriqu3s.com/andr3/fyp/logic/utils"
|
||||
)
|
||||
|
||||
const (
|
||||
host = "localhost"
|
||||
port = 5432
|
||||
user = "postgres"
|
||||
password = "verysafepassword"
|
||||
dbname = "aistuff"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
config := LoadConfig()
|
||||
log.Info("Config loaded!", "config", config)
|
||||
|
||||
psqlInfo := fmt.Sprintf("host=%s port=%d user=%s "+
|
||||
"password=%s dbname=%s sslmode=disable",
|
||||
host, port, user, password, dbname)
|
||||
config.DbInfo.Host, config.DbInfo.Port, config.DbInfo.User, config.DbInfo.Password, config.DbInfo.Dbname)
|
||||
|
||||
db := db.StartUp(psqlInfo)
|
||||
defer db.Close()
|
||||
|
||||
config := LoadConfig()
|
||||
log.Info("Config loaded!", "config", config)
|
||||
config.GenerateToken(db)
|
||||
|
||||
//TODO check if file structure exists to save data
|
||||
|
||||
Reference in New Issue
Block a user