-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
29 lines (20 loc) · 830 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import express from 'express';
import amazonRoutes from './src/routes/amazonRoutes.js';
import { scrapeReviews } from './src/puppeteer/crawler.js';
import { configDotenv } from 'dotenv';
configDotenv();
const app = express();
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
// const url = 'https://bot.sannysoft.com/';
// const url = 'https://2717recovery.com/products/recovery-cream';
// const url = 'https://www.amazon.in/crocs-Classic-Walnut-Clog-205413-267/dp/B0BQHTP848';
// scrapeReviews(url);
app.use('/api/amazon', amazonRoutes);
// app.use('/api/twoSevenOneSeven', twoSevenOneSevenRoutes);
// app.use('/api/bhumi', bhumiRoutes);
// app.use('/api/lyfefuel', lyfefuelRoutes);
const port = process.env.PORT;
app.listen(port, () => {
console.log(`Server running on port: ${port}`);
});