Notification service #35

Merged
bilal.catic merged 26 commits from notification-service into master 2019-09-30 16:23:40 +02:00
2 changed files with 15 additions and 1 deletions
Showing only changes of commit c57d3f8457 - Show all commits

View File

@@ -11,7 +11,8 @@
"setup": "docker build -t marketalerts . && docker run -e POSTGRES_USER=docker -e POSTGRES_PASSWORD=docker -e POSTGRES_DB=marketalerts --name pg_marketalerts -d -p 5432:5432 marketalerts && sleep 4 && npm run migrate",
"docker-start": "docker start pg_marketalerts",
"docker-stop": "docker stop pg_marketalerts",
"crawl": "cd app/crawler && node npmCrawl.js"
"crawl": "cd app/crawler && node npmCrawl.js",
"test-search": "cd test && node searchTest.js"
},
"repository": {
"type": "git",

13
test/searchTest.js Normal file
View File

@@ -0,0 +1,13 @@
const { getRealEstateById } = require("../app/helpers/db/realEstate");
const {
findSearchRequestsForRealEstate
} = require("../app/helpers/db/searchRequest");
(async () => {
const realEstate = await getRealEstateById(53069);
const searchRequestsForRealEstate = await findSearchRequestsForRealEstate(
realEstate
);
console.log(searchRequestsForRealEstate);
})();