Welcome to the Linux Foundation Forum!

Bug in Exploring Service Mocking: Mocking GET Routes (2)

Options

References to http://localhost:5050/ should instead read http://localhost:3000/.

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Comments

  • Posts: 2,335

    Hi @mutation5252

    Thank you for flagging this. We have reached out to the course author to confirm the change. Once confirmed, we will update the course.

    Regards,
    Flavia
    Linux Foundation Education

  • Posts: 1

    Hi mutation5252, could you please walk me through the steps you took? When you say the course references port 5050 but should instead say port 3000, are you referring to the mock service or the web app?

  • Posts: 5

    @ajjones The mock service runs on port 3000 whereas the web app runs on port 5050. The document states,

    The populateProduct function now accepts a category argument and the call to fetch has been updated to:

    1. const res = await fetch(`${API}/${category}`)

    Earlier, it defines API to be:

    1. const API = 'http://localhost:3000'

    It then indicates:

    When a category is selected, a request is made to http://localhost:5050/{cat}, where {cat} is the selected category. So, ultimately we need our mock service to support two routes:

    However, since the mock service runs at port 3000, all references to 5050 in the documentation in the lines above should read 3000.

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training