Skip to content

Commit 3e1ae96

Browse files
committedMay 24, 2020
.
1 parent 78163f2 commit 3e1ae96

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed
 

‎flask.rst

+6-5
Original file line numberDiff line numberDiff line change
@@ -337,26 +337,27 @@ If we run ``docker ps``, under PORTS, we should be able to see
337337
that the Docker host IP 0.0.0.0 and port 5000, is accessible to the container at port 5000.
338338

339339

340-
Accessing Environment Variables
341-
--------------------------------
340+
Environment Variables
341+
----------------------
342342

343343
We can and should set environment variables; i.e., variables stored in the OS,
344344
especially for passwords and keys, rather than in python scripts. This helps with
345-
version control as you don't want to upload them to the github, though now it prevents keys from uploading.
345+
version control as you don't want to upload them to the github, or other version control platforms.
346346
Presently I guess, it still reduces the need to copy/paste the keys into the script everytime you launch the app.
347347

348-
To do this, in Mac/Linux, we can store the env variable in a .bash_profile.
348+
To do this, in Mac/Linux, we can store the environment variable in a ``.bash_profile``.
349349

350350
.. code:: bash
351351
352352
# open/create bash_profile
353353
nano ~/.bash_profile
354+
354355
# add new environment variable
355356
export SECRET_KEY="key"
357+
356358
# restart bash_profile
357359
source ~/.bash_profile
358360
359-
360361
# we can test by printing it in the console
361362
echo $SECRET_KEY
362363

0 commit comments

Comments
 (0)
Please sign in to comment.