- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
Latest commit
22 lines (18 loc) · 548 Bytes
/
Copy pathapp.js
File metadata and controls
22 lines (18 loc) · 548 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
constexpress=require('express')
constapp=express()
constport=3000
constpath=require('path');
constrouter=express.Router();
constdataHandler=require("./dataHandler.js");
//connect the router to express app
app.use('/',router);
app.use(express.static("public"));
router.get('/',(req,res)=>{
res.sendFile(path.join(__dirname+"/index.html"));
});
app.listen(port,()=>{
console.log(`Example app listening on port ${port}`)
});
router.get("/dataHandler",(req,res)=>{
res.json({jirasObj:dataHandler.jirasObj})
});