Skip to content

Commit ff10e35

Browse files
committed
Add Set And Show Heroku Env Variables as a Heroku til
1 parent ec0f65a commit ff10e35

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pairing with smart people at Hashrocket.
1010

1111
For a steady stream of TILs, [sign up for my newsletter](https://tinyletter.com/jbranchaud).
1212

13-
_1109 TILs and counting..._
13+
_1110 TILs and counting..._
1414

1515
---
1616

@@ -323,6 +323,10 @@ _1109 TILs and counting..._
323323
- [Sleep For A Duration](go/sleep-for-a-duration.md)
324324
- [Upgrading From An Older Version On Mac](go/upgrading-from-an-older-version-on-mac.md)
325325

326+
### Heroku
327+
328+
- [Set And Show Heroku Env Variables](heroku/set-and-show-heroku-env-variables.md)
329+
326330
### HTML
327331

328332
- [Adding Alt Text To An Image](html/adding-alt-text-to-an-image.md)
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Set And Show Heroku Env Variables
2+
3+
The `heroku` CLI includes the `config` command which will show all the env
4+
variables for the current app.
5+
6+
```bash
7+
$ heroku config
8+
=== my-app Config Vars
9+
10+
```
11+
12+
At this point I have none set.
13+
14+
I can set one with the `config:set` command and a key-value parameter.
15+
16+
```bash
17+
$ heroku config:set PUBLIC_NEXT_URL=http://localhost:1235
18+
Setting PUBLIC_NEXT_URL and restarting ⬢ my-app... done, v3
19+
PUBLIC_NEXT_URL: http://localhost:1235
20+
```
21+
22+
I can see the value that this specific variable is set to by calling it with
23+
`config:get`.
24+
25+
```bash
26+
$ heroku config:get PUBLIC_NEXT_URL
27+
http://localhost:1235
28+
```
29+
30+
[source](https://devcenter.heroku.com/articles/config-vars#using-the-heroku-cli)

0 commit comments

Comments
 (0)