项目作者: SirwanAfifi

项目描述 :
A RSS Feed generator for nestjs
高级语言: TypeScript
项目地址: git://github.com/SirwanAfifi/nestjs_rss_feed.git
创建时间: 2021-02-09T19:39:12Z
项目社区:https://github.com/SirwanAfifi/nestjs_rss_feed

开源协议:MIT License

下载



Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.



@nestjs/core.svg" alt="NPM Version" />
@nestjs/core.svg" alt="Package License" />
@nestjs/common.svg" alt="NPM Downloads" />
CircleCI
Coverage
Discord
Backers on Open Collective
Sponsors on Open Collective

Support us


Description

A RSS Feed generator

Usage

  1. Install the package
  1. yarn add nestjs-rss-feed
  2. or
  3. npm install nestjs-rss-feed
  1. Use the interceptor:
  1. @Controller()
  2. export class AppController {
  3. @UseInterceptors(
  4. new RssInterceptor({
  5. link: "https://example.com",
  6. })
  7. )
  8. @Get()
  9. posts() {
  10. return [
  11. {
  12. title: "Post One",
  13. authorName: "Sirwan",
  14. content: "This is a sample content",
  15. categories: ["JS", "React"],
  16. url: "",
  17. lastUpdatedTime: new Date(),
  18. publishDate: new Date(),
  19. },
  20. ];
  21. }
  22. }