1.0.1 • Published 3 years ago

nestjs-rss-feed v1.0.1

Weekly downloads
5
License
MIT
Repository
github
Last release
3 years ago

Description

A RSS Feed generator

Usage

  1. Install the package
yarn add nestjs-rss-feed
or
npm install nestjs-rss-feed
  1. Use the interceptor:
@Controller()
export class AppController {
  @UseInterceptors(
    new RssInterceptor({
      link: "https://example.com",
    })
  )
  @Get()
  posts() {
    return [
      {
        title: "Post One",
        authorName: "Sirwan",
        content: "This is a sample content",
        categories: ["JS", "React"],
        url: "",
        lastUpdatedTime: new Date(),
        publishDate: new Date(),
      },
    ];
  }
}