Use DATABASE_URL environment variable if no Url is set

This commit is contained in:
Clint Shryock 2014-10-28 08:52:04 -05:00
parent 9ad0ca9839
commit a9e664f41d

View File

@ -75,6 +75,10 @@ func initOptions() {
os.Exit(1)
}
if options.Url == "" {
options.Url = os.Getenv("DATABASE_URL")
}
if options.Version {
fmt.Printf("pgweb v%s\n", VERSION)
os.Exit(0)