Can't pass serving json on a specific route test

I’m at a loss as to why the test won’t recognise my result.
I have the url displaying {“message”:“Hello json”}

The code I wrote is:

app.get('/json', (req, res) => {
  res.json({
    "message": "Hello json"
  })
})

Can someone help me understand what’s going wrong?

Thanks

Project link(s)

solution: https://boilerplate-express-2.mattnk.repl.co/json

Browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36

Challenge: Serve JSON on a Specific Route

Link to the challenge:

When you submit the link, don’t include the /json route in the URL, because the tests are then ending up with this URL:
https://boilerplate-express-2.mattnk.repl.co/json/json

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.