Created
November 2, 2019 17:46
-
-
Save guibeira/e05ae575c3cfac2000b7226aca809a48 to your computer and use it in GitHub Desktop.
easy way to connect to database using heroku name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
default_db="heroku config:get DATABASE_URL --app " | |
args=("$@") | |
DATABASE_URL=$($default_db ${args[0]}) | |
PG_WEB="pgweb --url" | |
echo $(xdg-open http://localhost:8081/) | |
echo $($PG_WEB $DATABASE_URL) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment