Spaces:
Runtime error
Runtime error
atikur-rabbi
commited on
Commit
•
daa94ed
1
Parent(s):
7084e65
up
Browse files
app.js
CHANGED
@@ -13,7 +13,12 @@ router.use(function (req,res,next) {
|
|
13 |
next();
|
14 |
});
|
15 |
|
|
|
16 |
router.get("/",function(req,res){
|
|
|
|
|
|
|
|
|
17 |
res.sendFile(path + "index.html");
|
18 |
});
|
19 |
|
@@ -25,5 +30,5 @@ app.use(express.static(path));
|
|
25 |
app.use("/", router);
|
26 |
|
27 |
app.listen(PORT, function () {
|
28 |
-
console.log(`Example app listening on port
|
29 |
})
|
|
|
13 |
next();
|
14 |
});
|
15 |
|
16 |
+
// Hello world api
|
17 |
router.get("/",function(req,res){
|
18 |
+
res.send("Hello world!");
|
19 |
+
});
|
20 |
+
|
21 |
+
router.get("/home",function(req,res){
|
22 |
res.sendFile(path + "index.html");
|
23 |
});
|
24 |
|
|
|
30 |
app.use("/", router);
|
31 |
|
32 |
app.listen(PORT, function () {
|
33 |
+
console.log(`Example app listening on port ${PORT}`)
|
34 |
})
|