-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.js
More file actions
24 lines (19 loc) · 720 Bytes
/
index.js
File metadata and controls
24 lines (19 loc) · 720 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const dotenv = require("dotenv").config();
const { envVar } = require("./envvar");
const express = require("express");
const { client } = require("./twitterClient");
const { getTweets } = require("./tweetProcessing/getTweets");
const { postTweets } = require("./tweetProcessing/postTweets");
const { postRetweets } = require("./tweetProcessing/postRetweets");
const { processIncomingTweets } = require("./tweetProcessing/processTweets");
const app = express();
setInterval(processIncomingTweets, 1 * 60 * 1000);
// setInterval(processIncomingTweets, 15000);
app.get("/", async (req, res) => {
try {
res.json({ status: 200 });
} catch {
console.error("app not started");
}
});
app.listen(envVar.PORT);