Basic Node and Express - Serve JSON on a Specific Route

Tell us what’s happening:
Describe your issue in detail here.
I have complete this tasks " Serve the object {"message": "Hello json"} as a response, in JSON format, to GET requests to the /json route. Then point your browser to your-app-url/json , you should see the message on the screen." I am getting this response when I call this api in any browser. But freecodecamp says: " The endpoint /json should serve the json object {"message": "Hello json"}" . I have tried in many ways.
url

Did you have a question?

If you are wondering why it is failing, when you enter the solution link, give it the url of the app, not that specific endpoint.

Don’t give it:

https://drab-red-pangolin-wrap.cyclic.app/json

give it:

https://drab-red-pangolin-wrap.cyclic.app

Otherwise it will try to go to:

https://drab-red-pangolin-wrap.cyclic.app/json/json

and fail.

If I give it the right url to the app, it passes for me.

I got it. Thanks a lot. I am trying this for last three hours.

Yeah, we’ve all been there. :wink:

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