diff --git a/server/src/server.mjs b/server/src/server.mjs index e631343..8fd4409 100644 --- a/server/src/server.mjs +++ b/server/src/server.mjs @@ -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}`) +});