Merge pull request #27 from catsby/database_url

Use DATABASE_URL environment variable if no Url is set
This commit is contained in:
Dan Sosedoff 2014-10-28 11:44:22 -05:00
commit 68e97cceb8

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)