From 1ba88935b2c9999b1c77b3fdcdd852cf717a738e Mon Sep 17 00:00:00 2001 From: Shaun Hamilton <51722130+ShaunSHamilton@users.noreply.github.com> Date: Fri, 16 Apr 2021 13:31:43 +0100 Subject: [PATCH] feat(curriculum): clarify Replit use of env files (#41840) --- .../basic-node-and-express/use-the-.env-file.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/curriculum/challenges/english/05-apis-and-microservices/basic-node-and-express/use-the-.env-file.md b/curriculum/challenges/english/05-apis-and-microservices/basic-node-and-express/use-the-.env-file.md index 8bd5f45090b..e953553f4be 100644 --- a/curriculum/challenges/english/05-apis-and-microservices/basic-node-and-express/use-the-.env-file.md +++ b/curriculum/challenges/english/05-apis-and-microservices/basic-node-and-express/use-the-.env-file.md @@ -16,7 +16,11 @@ The environment variables are accessible from the app as `process.env.VAR_NAME`. Let's add an environment variable as a configuration option. -Create a `.env` file in the root of your project directory, and store the variable `MESSAGE_STYLE=uppercase` in it. Then, in the GET `/json` route handler that you created in the last challenge, transform the response object’s message to uppercase if `process.env.MESSAGE_STYLE` equals `uppercase`. The response object should become `{"message": "HELLO JSON"}`. +Create a `.env` file in the root of your project directory, and store the variable `MESSAGE_STYLE=uppercase` in it. + +Then, in the `/json` GET route handler you created in the last challenge, transform the response object's message to uppercase if `process.env.MESSAGE_STYLE` equals `uppercase`. The response object should either be `{"message": "Hello json"}` or `{"message": "HELLO JSON"}`, depending on the `MESSAGE_STYLE` value. + +**Note:** If you are using Replit, you cannot create a `.env` file. Instead, use the built-in SECRETS tab to add the variable. # --hints--