import 'dotenv/config' import express from 'express' const app = express() const port = process.env.PORT || 3000 import WeatherScraper from './weatherScraper.js' const scraper = new WeatherScraper() await scraper.init() setInterval(() => scraper.fetch(), 1000 * 60 * 5) app.get('/', (req, res) => { res.json(scraper.data) }) app.listen(port, () => { console.log(`Weather Scraper listening on port ${port}`) })