diff --git a/content/get-started/introduction/develop-with-containers.md b/content/get-started/introduction/develop-with-containers.md index e535c52babfb..a4fa425515f7 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) diff --git a/content/guides/docker-scout/demo.md b/content/guides/docker-scout/demo.md index 4c37f902452b..2304b82d8fee 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 ---