Heroku Flashcards
1
Q
How to add SSH key to Heroku
A
In terminal:
heroku keys:add
2
Q
How to create a new Heroku app
A
In the terminal:
heroku create app-name
3
Q
What do we need to add to the package.json file in order for heroku to run our application
A
A script
“start”:”node src/app.js”
4
Q
How do we need to set the port for running a server on heroku?
A
const port = process.env.PORT || 3000
5
Q
Checks before deploying on heroku?
A
- Start scirpt
- Port values
- Appi urls
6
Q
How to push to heroku?
A
git push heroku master
7
Q
Heroku setup workflow
A
- download heroku to your machine
- add ssh key: heroku ssh:add
- create new app: heroku create app-name
- Setup package.json for deployment
- push to github: git push origin master
- push to heroku: git push heroku master
8
Q
How to set environment variables on heroku?
A
heroku config:set VARIABLE_NAME=someValue
9
Q
How to delete an environment variable?
A
heroku config:unset VARIABLE_NAME
10
Q
How to see a list of environment variables?
A
heroku config