From 37ba7e2c8c96b4728c70ab585ffdd1cc515d239f Mon Sep 17 00:00:00 2001 From: Bilal Catic Date: Mon, 30 Sep 2019 13:53:35 +0200 Subject: [PATCH] pass new real estates to the notification service --- index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 5faf461..3ac5a92 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,3 @@ -require("dotenv").config(); - const express = require("express"); const path = require("path"); const bodyParser = require("body-parser"); @@ -13,6 +11,9 @@ const { } = require("./app/config/appConfig"); const routes = require("./app/routes"); const { crawlAll } = require("./app/crawler/crawl"); +const { + notifyForNewRealEstates +} = require("./app/services/notificationService"); const app = express(); @@ -38,6 +39,7 @@ const crawl = () => { crawlerRunning = true; crawlAll().then(newRealEstates => { crawlerRunning = false; + notifyForNewRealEstates(newRealEstates); }); } };