-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathapp.js
More file actions
25 lines (19 loc) · 667 Bytes
/
app.js
File metadata and controls
25 lines (19 loc) · 667 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
25
const express = require('express')
const OpenseaScraper = require("opensea-scraper")
const cors = require('cors')
const app = express()
const port = 3000
app.use(cors())
app.get('/', async (req, res) => {
const result = await OpenseaScraper.offersByUrl("https://opensea.io/collection/rarebunniclub?search[sortAscending]=true&search[sortBy]=PRICE&search[toggles][0]=BUY_NOW&search[priceFilter][symbol]=ETH&search[priceFilter][max]=0.12", {
// debug: true,
// logs: true
});
res.json(result['offers']);
})
app.get('/os', (req, res) => {
res.send('Loading')
})
app.listen(port, () => {
console.log(`Example app listening at http://localhost:${port}`)
})