-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add deploy to heroku #609
base: develop
Are you sure you want to change the base?
Add deploy to heroku #609
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"name": "Kutt", | ||
"description": "Free Modern URL Shortener.", | ||
"website": "https://kutt.it", | ||
"repository": "https://github.com/thedevs-network/kutt", | ||
"logo": "https://kutt.it/images/logo.svg", | ||
"success_url": "/", | ||
"env": { | ||
"NPM_CONFIG_PRODUCTION": { | ||
"value": "false" | ||
}, | ||
"PGSSLMODE": { | ||
"value": "no-verify" | ||
}, | ||
Comment on lines
+12
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is needed to connect to Heroku's Postgres without modifying the js code. https://devcenter.heroku.com/articles/connecting-heroku-postgres#connecting-in-node-js |
||
"SITE_NAME": { | ||
"value": "Kutt" | ||
}, | ||
"DEFAULT_DOMAIN": { | ||
"value": "CHANGE.herokuapp.com" | ||
}, | ||
"JWT_SECRET": { | ||
"generator": "secret" | ||
}, | ||
"MAIL_HOST": { | ||
"required": false, | ||
"value": "" | ||
}, | ||
"MAIL_PORT": { | ||
"required": false, | ||
"value": "" | ||
}, | ||
"MAIL_USER": { | ||
"required": false, | ||
"value": "" | ||
}, | ||
"MAIL_PASSWORD": { | ||
"required": false, | ||
"value": "" | ||
} | ||
Comment on lines
+24
to
+39
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will allow users to manually verify the user using the method mentioned in #269 (comment) |
||
}, | ||
"formation": { | ||
"web": { | ||
"quantity": 1, | ||
"size": "FREE" | ||
} | ||
}, | ||
"addons": [ "heroku-redis", "heroku-postgresql"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ import redis from "redis"; | |
import env from "./env"; | ||
|
||
const client = redis.createClient({ | ||
url: env.REDIS_URL, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The short-circuit syntax
|
||
host: env.REDIS_HOST, | ||
port: env.REDIS_PORT, | ||
...(env.REDIS_PASSWORD && { password: env.REDIS_PASSWORD }) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed for knex migrate to run properly.
https://stackoverflow.com/a/64679533/7168030