Spaces:
Running
Running
Update index.js
Browse files
index.js
CHANGED
@@ -1,33 +1,33 @@
|
|
1 |
-
const express = require("express");
|
2 |
-
require('dotenv').config();
|
3 |
-
|
4 |
-
const { getNews, getNews2 } = require("./news");
|
5 |
-
const { updateEmailNews, sendEmail } = require("./emails");
|
6 |
-
|
7 |
-
|
8 |
-
const app = express();
|
9 |
-
const port = 8000;
|
10 |
-
app.listen(port, () => {
|
11 |
-
console.log(`Server running at http://localhost:${port}`)
|
12 |
-
});
|
13 |
-
|
14 |
-
app.get("/", (requset, response) => {
|
15 |
-
response.send({
|
16 |
-
STATUS: "OK"
|
17 |
-
});
|
18 |
-
});
|
19 |
-
|
20 |
-
|
21 |
-
app.get("/rss-parse", getNews);
|
22 |
-
|
23 |
-
app.get("/update-email-news", updateEmailNews);
|
24 |
-
|
25 |
-
app.get("/send-email", sendEmail);
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
|
|
1 |
+
const express = require("express");
|
2 |
+
//require('dotenv').config();
|
3 |
+
|
4 |
+
const { getNews, getNews2 } = require("./news");
|
5 |
+
const { updateEmailNews, sendEmail } = require("./emails");
|
6 |
+
|
7 |
+
|
8 |
+
const app = express();
|
9 |
+
const port = 8000;
|
10 |
+
app.listen(port, () => {
|
11 |
+
console.log(`Server running at http://localhost:${port}`)
|
12 |
+
});
|
13 |
+
|
14 |
+
app.get("/", (requset, response) => {
|
15 |
+
response.send({
|
16 |
+
STATUS: "OK"
|
17 |
+
});
|
18 |
+
});
|
19 |
+
|
20 |
+
|
21 |
+
app.get("/rss-parse", getNews);
|
22 |
+
|
23 |
+
app.get("/update-email-news", updateEmailNews);
|
24 |
+
|
25 |
+
app.get("/send-email", sendEmail);
|
26 |
+
|
27 |
+
|
28 |
+
|
29 |
+
|
30 |
+
|
31 |
+
|
32 |
+
|
33 |
+
|