What is the best way to generate an atom or rss feed in a node.js application

I am trying to add newsfeeds to a node.js application using express.js and I cannot find a painless way to take the json model and turn it into an Atom or rss channel. The best solutions I came up with is to use the Xml library (also not very hot on node.js) or the EJS template and create it manually.

There seems to be a lot of code for parsing rss / atom in json, but not for going in the other direction. Did I miss something?

+6
source share
4 answers

Search NPM Registration for RSS

gives rss

See the github section for more details.

As a general tip, search the npm registry for relevant keywords. It will make your life easier.

+6
source

You can use Feed for Node.js. This is a very simple wrapper that I created a couple of weeks ago to instantly generate an Atom and RSS feed.

Just install it using NPM:

$ npm install feed 

Then follow the documentation available there http://projets.jpmonette.net/en/feed !

+5
source

I'm afraid not. The best I can do is to recommend you look at wheat , the “complete blogging solution” written in Node. It has support for multiple channels, but mostly these are just handwritten XML files driven by templates.

Or you can write one and send it to NPM!

0
source

You can check out this tutorial, where they explained well: http://programmerblog.net/how-to-generate-rss-feed-using-nodejs/

0
source

Source: https://habr.com/ru/post/896440/


All Articles