24h forecasting
This commit is contained in:
@@ -16,9 +16,6 @@ const app = express();
|
||||
const DIR = dirname(fileURLToPath(import.meta.url));
|
||||
const CLIENT_DIST = resolve(DIR, 'public');
|
||||
|
||||
refreshForecast()
|
||||
setInterval(refreshForecast, 10 * 60 * 1000)
|
||||
|
||||
app.use(express.json());
|
||||
app.use('/icons', express.static(resolve(DIR, 'public', 'icons')));
|
||||
app.use((req, res, next) => {
|
||||
@@ -184,5 +181,10 @@ app.get('*', (req, res) => {
|
||||
|
||||
// ── Start ─────────────────────────────────────────────────────────────────────
|
||||
|
||||
refreshForecast()
|
||||
setInterval(refreshForecast, 10 * 60 * 1000)
|
||||
|
||||
const c = cfg();
|
||||
app.listen(c.PORT, () => console.log(`🌦 Weather API — http://localhost:${c.PORT}`));
|
||||
app.listen(c.PORT, () => {
|
||||
console.log(`🌦 Weather API — http://localhost:${c.PORT}`)
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user