There seems some issue with the exercise

Tell us what’s happening:
The path /json is outputting the desired output but still getting error

{"message":"Hello json"}

Below is the code:

var express = require('express');
var app = express();
// console.log("Hello World")
app.use("/public", express.static(__dirname + "/public"));

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

Your project link(s)

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36

Challenge: Serve JSON on a Specific Route

Link to the challenge:

Hello there,

Please note: The tests work by taking the link you provide, and appending the required endpoint to the provided link. So, if you input this link:

The tests will test this link:

Hope this clarifies

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