What am i not doing well here cos when i submitted the link on both my localHost and thru replit i still could not pass the test

Tell us what’s happening:
Describe your issue in detail here.

let express = require(“express”);

let app = express();

app.use(express.static(__dirname + “/public”));

app.use("/public", express.static(__dirname + “/public”));

app.get("/", (req, res) => {

res.sendFile(__dirname + “/views/index.html”);

});

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

res.json({

message: "hello json",

});

});

console.log(“hi”);

module.exports = app;
Your project link(s)

solution: http://localhost:3000

Your browser information:

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

Challenge: Serve JSON on a Specific Route

Link to the challenge:

YES , you asked a very Much Good Question, when you submitted the link you follow the Rules and regulations, and you should pass the test if you do the guidelines of the best Digital Marketing Services Provider, They have the best service provider as compared to others ,

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