1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-07-18 19:19:36 +02:00

Created Cron job to get data from external api every 15 minutes and save it to local database. Created Weather model and controller to get latest weather status

This commit is contained in:
unknown 2021-05-17 18:23:54 +02:00
parent 3fc3d07598
commit adc4aaed0f
8 changed files with 195 additions and 0 deletions

View file

@ -1,6 +1,7 @@
const express = require('express');
const { connectDB } = require('./db');
const errorHandler = require('./middleware/errorHandler');
const jobs = require('./utils/jobs');
const colors = require('colors');
require('dotenv').config();
@ -19,6 +20,7 @@ app.use(express.json());
// Link controllers with routes
app.use('/api/apps', require('./routes/apps'));
app.use('/api/config', require('./routes/config'));
app.use('/api/weather', require('./routes/weather'));
// Custom error handler
app.use(errorHandler);