Skip to content

Commit 4479ea6

Browse files
authored
KarandeepSinghCoder (#6)
1 parent 5fe3e01 commit 4479ea6

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
var express = require("express");
2+
var app = express();
3+
4+
app.get("/",function(req,res){
5+
res.send("Hello");
6+
});
7+
app.get("/user/:user",function(req,res){
8+
res.send("Hello "+req.params.user);
9+
});
10+
app.get("/date",function(req,res){
11+
var date = new Date();
12+
var jdata={day: today.getDate(), month:today.getMonth()+1, year:today.getFullYear()};
13+
res.json(jdata);
14+
});
15+
16+
app.listen(3000,function(){
17+
console.log("Server started");
18+
});

0 commit comments

Comments
 (0)