Skip to content

Commit

Permalink
add logs for ENV vars
Browse files Browse the repository at this point in the history
  • Loading branch information
dmonay committed Feb 22, 2015
1 parent 32a3a1a commit 6ac8e65
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions handlers/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,13 @@ func Run(cfg common.Config) error {
func InitMongo() (*mgo.Database, *mgo.Session, error) {

uri := os.Getenv("MONGOHQ_URL")
fmt.Println("uri: ", uri)
if uri == "" {
fmt.Println("\x1b[31;1mno connection string provided\x1b[0m")
os.Exit(1)
}
db_name := os.Getenv("MONGOHQ_DB")
fmt.Println("db: ", db_name)
if db_name == "" {
fmt.Println("\x1b[31;1mno db name provided\x1b[0m")
os.Exit(1)
Expand Down
Binary file modified okra
Binary file not shown.

0 comments on commit 6ac8e65

Please sign in to comment.