-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver.js
23 lines (19 loc) · 985 Bytes
/
server.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const express = require('express');
const fetchResolvedIssues = require('./services/fetchResolvedIssues');
const fetchTransitions = require('./services/fetchTransitions');
const fetchAggregatedDurations = require('./services/fetchAggregatedDurations');
const fetchReopenedCount = require('./services/fetchReopenedCount');
const { fetchCycleTimeseries } = require('./services/fetchCycleTimeseries');
const { fetchBugCycleTimes } = require('./services/fetchBugCycleTimes');
require('dotenv').config();
const app = express();
const port = process.env.PORT || 3000;
app.get('/fetch-resolved-issues', fetchResolvedIssues);
app.get('/fetch-transitions', fetchTransitions);
app.get('/fetch-aggregated-durations', fetchAggregatedDurations);
app.get('/fetch-reopened-count', fetchReopenedCount);
app.get('/fetch-cycle-timeseries', fetchCycleTimeseries);
app.get('/fetch-bug-cycle-times', fetchBugCycleTimes);
app.listen(port, () => {
console.log(`Server is running on port ${port}`);
});