From 2be013de1f758f3407a23b742e562d5b476e2951 Mon Sep 17 00:00:00 2001 From: Bilal Catic Date: Mon, 4 Nov 2019 11:03:43 +0100 Subject: [PATCH] add npm script for sending daily notifications --- app/npmScripts/npmDailyNotify.js | 8 ++++++++ package.json | 1 + 2 files changed, 9 insertions(+) create mode 100644 app/npmScripts/npmDailyNotify.js diff --git a/app/npmScripts/npmDailyNotify.js b/app/npmScripts/npmDailyNotify.js new file mode 100644 index 0000000..8eb6d33 --- /dev/null +++ b/app/npmScripts/npmDailyNotify.js @@ -0,0 +1,8 @@ +"use strict"; +const { + notifyRequestsWithDailyOption +} = require("../services/notificationService"); + +(async () => { + await notifyRequestsWithDailyOption(); +})(); diff --git a/package.json b/package.json index 45a5670..6c00483 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "docker-start": "docker start pg_marketalerts", "docker-stop": "docker stop pg_marketalerts", "crawl": "cd app/crawler && node npmCrawl.js", + "daily-notify": "cd app/npmScripts && node npmDailyNotify.js", "test-search": "cd test && node searchTest.js", "test-olx-scraper": "cd test && node olxScrapeTest.js" },