mirror of
https://github.com/jbranchaud/til
synced 2026-01-03 07:08:01 +00:00
Add Set And Show Heroku Env Variables as a Heroku til
This commit is contained in:
@@ -10,7 +10,7 @@ pairing with smart people at Hashrocket.
|
|||||||
|
|
||||||
For a steady stream of TILs, [sign up for my newsletter](https://tinyletter.com/jbranchaud).
|
For a steady stream of TILs, [sign up for my newsletter](https://tinyletter.com/jbranchaud).
|
||||||
|
|
||||||
_1109 TILs and counting..._
|
_1110 TILs and counting..._
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -323,6 +323,10 @@ _1109 TILs and counting..._
|
|||||||
- [Sleep For A Duration](go/sleep-for-a-duration.md)
|
- [Sleep For A Duration](go/sleep-for-a-duration.md)
|
||||||
- [Upgrading From An Older Version On Mac](go/upgrading-from-an-older-version-on-mac.md)
|
- [Upgrading From An Older Version On Mac](go/upgrading-from-an-older-version-on-mac.md)
|
||||||
|
|
||||||
|
### Heroku
|
||||||
|
|
||||||
|
- [Set And Show Heroku Env Variables](heroku/set-and-show-heroku-env-variables.md)
|
||||||
|
|
||||||
### HTML
|
### HTML
|
||||||
|
|
||||||
- [Adding Alt Text To An Image](html/adding-alt-text-to-an-image.md)
|
- [Adding Alt Text To An Image](html/adding-alt-text-to-an-image.md)
|
||||||
|
|||||||
30
heroku/set-and-show-heroku-env-variables.md
Normal file
30
heroku/set-and-show-heroku-env-variables.md
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
# Set And Show Heroku Env Variables
|
||||||
|
|
||||||
|
The `heroku` CLI includes the `config` command which will show all the env
|
||||||
|
variables for the current app.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ heroku config
|
||||||
|
=== my-app Config Vars
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
At this point I have none set.
|
||||||
|
|
||||||
|
I can set one with the `config:set` command and a key-value parameter.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ heroku config:set PUBLIC_NEXT_URL=http://localhost:1235
|
||||||
|
Setting PUBLIC_NEXT_URL and restarting ⬢ my-app... done, v3
|
||||||
|
PUBLIC_NEXT_URL: http://localhost:1235
|
||||||
|
```
|
||||||
|
|
||||||
|
I can see the value that this specific variable is set to by calling it with
|
||||||
|
`config:get`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ heroku config:get PUBLIC_NEXT_URL
|
||||||
|
http://localhost:1235
|
||||||
|
```
|
||||||
|
|
||||||
|
[source](https://devcenter.heroku.com/articles/config-vars#using-the-heroku-cli)
|
||||||
Reference in New Issue
Block a user