Create a node server with the following requirements: Use the dotenv package to manage your development environment variables. PORT should be 3000 HOST should be localhost Endpoints /dotted Only GET requests are allowed. This endpoint will respond with the HTML content type. This endpoint will take two required query parameters: word1 and word2. The endpoint will take the two words and create a string that is the two words separated by enough “.” characters to make the length of the string 30. For example if word1 is “turtle” and word2 is “153” the output should be: turtle.....................153 The response body should be the string wrapped in a tag. /fizzBuzz Only GET requests are allowed. This endpoint will respond with the HTML content type. This endpoint will take two required query parameters: start and end. The endpoint will iterate from start to end and for each number it will: Show “Fizz” if the number is divisible by 3. Show “Buzz” if the number is divisible by 5. Show “FizzBuzz” if the number is divisible by both 3 and 5. Show the number if it is not divisible by 3 or 5. Each iteration output should be on a new line. For example, if start is 9 and end is 16, the output would look like this: Fizz Buzz 11 Fizz 13 14 FizzBuzz 16 The response body should be the string wrapped in a tag.

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter11: Sql Server Databases
Section: Chapter Questions
Problem 15RQ
icon
Related questions
Question
100%

Create a node server with the following requirements:

  1. Use the dotenv package to manage your development environment variables.
    1. PORT should be 3000
    2. HOST should be localhost
  2. Endpoints
    1. /dotted
      1. Only GET requests are allowed.
      2. This endpoint will respond with the HTML content type.
      3. This endpoint will take two required query parameters: word1 and word2.
      4. The endpoint will take the two words and create a string that is the two words separated by enough “.” characters to make the length of the string 30.
        1. For example if word1 is “turtle” and word2 is “153” the output should be: turtle.....................153
      5. The response body should be the string wrapped in a <pre> tag.
    2. /fizzBuzz
      1. Only GET requests are allowed.
      2. This endpoint will respond with the HTML content type.
      3. This endpoint will take two required query parameters: start and end.
      4. The endpoint will iterate from start to end and for each number it will:
        1. Show “Fizz” if the number is divisible by 3.
        2. Show “Buzz” if the number is divisible by 5.
        3. Show “FizzBuzz” if the number is divisible by both 3 and 5.
        4. Show the number if it is not divisible by 3 or 5.
        5. Each iteration output should be on a new line.
        6. For example, if start is 9 and end is 16, the output would look like this:
          1. Fizz
            Buzz
            11
            Fizz
            13
            14
            FizzBuzz
            16
        7. The response body should be the string wrapped in a <pre> tag.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Linux
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage