From 00784d491970685104224dddcb9e0df1f46b83ca Mon Sep 17 00:00:00 2001 From: Vinicius Pontes Date: Mon, 20 Jun 2022 03:27:23 -0300 Subject: [PATCH] Submission commit --- README.md | 7 ++++++- src/cron/update-space-flight-news.cron.ts | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f206530..b4447e7 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,14 @@ Backend service for the Coodesh "[Back-end Challenge 2021 🏅 - Space Flight Ne The service consumes the [Space Flight News API](https://api.spaceflightnewsapi.net/v3/documentation), saving articles about space news on its own database and exposing them through its own API. +Loom presentation link: https://www.loom.com/share/8030dc795bd94a3b9965c509cf8221ee + ## Try it Live! -https://space-flight-news-backend-node.herokuapp.com/ +Base URL: https://space-flight-news-backend-node.herokuapp.com/ +Documentation URL: https://space-flight-news-backend-node.herokuapp.com/api + +It might take a while for the service to answer on the first time. ## Technologies Used diff --git a/src/cron/update-space-flight-news.cron.ts b/src/cron/update-space-flight-news.cron.ts index 3080cfd..7f0be13 100644 --- a/src/cron/update-space-flight-news.cron.ts +++ b/src/cron/update-space-flight-news.cron.ts @@ -1,4 +1,4 @@ -import { Cron } from "@nestjs/schedule"; +import { Cron, Timeout } from "@nestjs/schedule"; import { HttpService } from "@nestjs/axios"; import { Injectable, Logger } from "@nestjs/common"; import { firstValueFrom } from "rxjs"; @@ -20,6 +20,7 @@ export class UpdateSpaceFlightNews { @InjectModel(Article.name) private readonly articleModel: Model
, ) {} + //@Timeout(1000) @Cron("0 0 9 * * *") async importArticles() { const queryParams = new SpaceFlightNewsQueryParameters();