From 29e9c2d8c4c504412d677a779610dc6749da0df6 Mon Sep 17 00:00:00 2001 From: Shelley Benhoff Date: Tue, 8 Oct 2024 13:33:17 -0400 Subject: [PATCH 1/2] Updated develop with containers Docker concept --- .../introduction/develop-with-containers.md | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/content/get-started/introduction/develop-with-containers.md b/content/get-started/introduction/develop-with-containers.md index e535c52bab..a4fa425515 100644 --- a/content/get-started/introduction/develop-with-containers.md +++ b/content/get-started/introduction/develop-with-containers.md @@ -79,24 +79,17 @@ With this environment up and running, you’re ready to make a few changes to th The greeting at the top of the page is populated by an API call at `/api/greeting`. Currently, it always returns "Hello world!". You’ll now modify it to return one of three randomized messages (that you'll get to choose). -1. Open the `backend/src/routes/getGreeting.js` file. This file provides the handler for the API endpoint. +1. Open the `backend/src/routes/getGreeting.js` file in a text editor. This file provides the handler for the API endpoint. -2. Modify the variable at the top to an array of greetings. Feel free to use the following modifications or customize it to your own liking. +2. Modify the variable at the top to an array of greetings. Feel free to use the following modifications or customize it to your own liking. Also, update the endpoint to send a random greeting from this list. - ```js {linenos=table,hl_lines=["1-5"],linenostart=1} + ```js {linenos=table,hl_lines=["1-5",9],linenostart=1} const GREETINGS = [ "Whalecome!", "All hands on deck!", "Charting the course ahead!", ]; - module.exports = async (req, res) => { - ... - ``` - -3. Now, update the endpoint to send a random greeting from this list by making the following change: - - ```js {linenos=table,hl_lines=[3],linenostart=7} module.exports = async (req, res) => { res.send({ greeting: GREETINGS[ Math.floor( Math.random() * GREETINGS.length )], @@ -104,7 +97,7 @@ The greeting at the top of the page is populated by an API call at `/api/greetin }; ``` -4. If you haven't done so yet, save the file. If you refresh your browser, you should see a new greeting. If you keep refreshing, you should see all of the messages appear. +3. If you haven't done so yet, save the file. If you refresh your browser, you should see a new greeting. If you keep refreshing, you should see all of the messages appear. ![Screenshot of the to-do app with a new greeting](images/develop-app-with-greetings.webp) From f2eba2142a173874e012aad96db0af6cba963617 Mon Sep 17 00:00:00 2001 From: Shelley Benhoff Date: Tue, 8 Oct 2024 14:29:40 -0400 Subject: [PATCH 2/2] Fixed typo --- content/guides/docker-scout/demo.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/guides/docker-scout/demo.md b/content/guides/docker-scout/demo.md index 4c37f90245..2304b82d8f 100644 --- a/content/guides/docker-scout/demo.md +++ b/content/guides/docker-scout/demo.md @@ -1,6 +1,6 @@ --- title: Docker Scout demo -description: Learn about Docke rScout's powerful features for enhanced supply chain security. +description: Learn about Docker Scout's powerful features for enhanced supply chain security. weight: 20 ---