diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 11 |
1 files changed, 6 insertions, 5 deletions
| @@ -2,18 +2,19 @@ package main | |||
| 2 | 2 | ||
| 3 | import ( | 3 | import ( |
| 4 | "database/sql" | 4 | "database/sql" |
| 5 | login "fagott.pw/charakterin" | ||
| 6 | "fagott.pw/grilist/frontend" | ||
| 7 | "github.com/julienschmidt/httprouter" | ||
| 8 | "log" | 5 | "log" |
| 9 | "net/http" | 6 | "net/http" |
| 10 | 7 | ||
| 8 | login "fagott.pw/charakterin" | ||
| 9 | "fagott.pw/grilist/frontend" | ||
| 10 | |||
| 11 | "github.com/julienschmidt/httprouter" | ||
| 11 | _ "github.com/lib/pq" | 12 | _ "github.com/lib/pq" |
| 12 | ) | 13 | ) |
| 13 | 14 | ||
| 14 | func main() { | 15 | func main() { |
| 15 | // Datenbankverbindung aufbauen | 16 | config := LoadConfig() |
| 16 | db, err := sql.Open("postgres", "host=grilist.moe user=grilist dbname=grilist password=grilist sslmode=disable") | 17 | db, err := sql.Open("postgres", config.DBConnectionString()) |
| 17 | if err != nil { | 18 | if err != nil { |
| 18 | log.Fatal(err) | 19 | log.Fatal(err) |
| 19 | } | 20 | } |
