api: use localhost instead of 0.0.0.0

This commit is contained in:
Adhityaa 2018-06-08 00:39:27 +05:30
parent 73647421fb
commit 6f3ed40b39
2 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@ import (
func parseConfig() error { func parseConfig() error {
defaults := map[string]string{ 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", "PORT": "8080",
"ORIGIN": "", "ORIGIN": "",

View File

@ -65,7 +65,7 @@ func setupTestDatabase() error {
// set it manually because we need to use commento_test, not commento, by mistake // set it manually because we need to use commento_test, not commento, by mistake
os.Setenv("POSTGRES", os.Getenv("COMMENTO_POSTGRES")) os.Setenv("POSTGRES", os.Getenv("COMMENTO_POSTGRES"))
} else { } 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 { if err := connectDB(); err != nil {