From 6f3ed40b3996e2c46ad6a0c3ee15767a34fdb0f3 Mon Sep 17 00:00:00 2001 From: Adhityaa Date: Fri, 8 Jun 2018 00:39:27 +0530 Subject: [PATCH] api: use localhost instead of 0.0.0.0 --- api/config.go | 2 +- api/testing.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/config.go b/api/config.go index 4c45363..596a7ff 100644 --- a/api/config.go +++ b/api/config.go @@ -6,7 +6,7 @@ import ( func parseConfig() error { defaults := map[string]string{ - "POSTGRES": "postgres://postgres:postgres@0.0.0.0/commento?sslmode=disable", + "POSTGRES": "postgres://postgres:postgres@localhost/commento?sslmode=disable", "PORT": "8080", "ORIGIN": "", diff --git a/api/testing.go b/api/testing.go index d76b018..881d2a2 100644 --- a/api/testing.go +++ b/api/testing.go @@ -65,7 +65,7 @@ func setupTestDatabase() error { // set it manually because we need to use commento_test, not commento, by mistake os.Setenv("POSTGRES", os.Getenv("COMMENTO_POSTGRES")) } else { - os.Setenv("POSTGRES", "postgres://postgres:postgres@0.0.0.0/commento_test?sslmode=disable") + os.Setenv("POSTGRES", "postgres://postgres:postgres@localhost/commento_test?sslmode=disable") } if err := connectDB(); err != nil {