summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorYukai Huang2016-12-12 10:18:12 +0800
committerYukai Huang2016-12-12 10:36:24 +0800
commit74c1da4536285593f3172f8be6a22ad300f73348 (patch)
tree0ff3b7dbf851a0c33eaf7fba92eb4669f0a75bb3 /bin
parent50b72c7f03ebf47a78ed303c7d0d41bf278dedba (diff)
Simplify output with sequelize database argument
Diffstat (limited to 'bin')
-rwxr-xr-xbin/heroku31
1 files changed, 2 insertions, 29 deletions
diff --git a/bin/heroku b/bin/heroku
index b0d0797a..0375e9e7 100755
--- a/bin/heroku
+++ b/bin/heroku
@@ -18,27 +18,13 @@ module.exports = {
}
EOF
- regex='postgres:\/\/([^:]+):([^@]+)@([^:]+):([^\/]+)\/(.+)'
- if [[ $DATABASE_URL =~ $regex ]]; then
-
- username="${BASH_REMATCH[1]}"
- password="${BASH_REMATCH[2]}"
- host="${BASH_REMATCH[3]}"
- port="${BASH_REMATCH[4]}"
- database="${BASH_REMATCH[5]}"
-
- cat << EOF > config.json
+ cat << EOF > config.json
{
"production": {
"db": {
- "dialect": "postgres",
- "host": "${host}",
- "username": "${username}",
- "password": "${password}",
- "database": "${database}",
- "port": "${port}",
+ "database": "${DATABASE_URL}",
"dialectOptions": {
"ssl": true
}
@@ -47,19 +33,6 @@ EOF
}
EOF
- else
-
- cat << EOF > config.json
-
-{
- "production": {
- }
-}
-
-EOF
-
- fi
-
cp public/js/config.js.example public/js/config.js