Some commands for Heroku
|
heroku version
|
Version
|
|
heroku login
|
Login
|
|
heroku create [appName]
|
Create app
|
|
heroku rename [newName]
|
Rename app
|
|
heroky logs -t
|
Show logs
|
|
heroku config:set PORT=3000
|
Create env variable
|
|
heroku config
|
Show env
|
|
heroku run bash
|
Runs bash in an off-dyno
|
|
heroku open graphql
|
Open server webpage to /graphql
|
|
heroku ps:scale web=0
|
Stop all the dynos
|
|
heroku ps:scale web=1
|
Start a dyno
|
|
heroku restart
|
Restart the app
|
|
heroku addons:create heroku-postgresql:hobby-dev --version=12
|
Create an addon
|
|
heroku addons:docs heroku-postgresql
|
Addon's documentation
|
|
heroku pg:wait
|
Wait pg is running
|
|
cat database/init_database.sql | heroku pg:psql
|
Init Database
|
|
heroku pg:info
|
Info Database usage
|
|
\dt+
|
Show tables
|
|
SELECT * FROM "User";
|
Show all users
|
|
SELECT * FROM user;
|
Show postgre user
|
|
GRANT [userName] to postgres
|
Grant userName to postgres (not used)
|
|
heroku git:remote -a [appName]
|
App heroku remote to project
|
|
git subtree push --prefix my-dir heroku main
|
Push a specific folder to heroku main branch
|
|
git subtree split -P my-dir -b my-dir-branch
|
Creates a new branch with only the specified folder
|
|
HOSTNAME=[appName].herokyapp.com
|
Set HOSTNAME in front
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.