Skip to content

Commit 2f1db3c

Browse files
committed
5.1 solution json message
1 parent 7646630 commit 2f1db3c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/server.js

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ app.get("/", (req, res) => {
88
res.sendFile(__dirname+"/views/index.html");
99
});
1010

11+
app.get("/json",(req,res)=>{
12+
res.json({message: "Hello json"});
13+
});
14+
1115
constserver=app.listen(process.env.PORT||3000);
1216

1317
// -- DO NOT EDIT BELOW THIS LINE

0 commit comments

Comments
 (0)
close