simple online nosql database database with REST API and MongoDB queries
  • Features
  • Docs
  • Blog
  • Templates
  • Pricing
  • Contact
  • Sign Up
  • Log In

Blog

 The latest news and articles about restdb.io  

Database templates!
Don't forget to visit our template catalog! It's the fastest way to get up and running with a restdb.io database. View templates »

How to create an RSS feed with restdb.io

by Knut Martin Tornes
|
User|Howto|
  • Share on Facebook
  • Tweet
  • Add to Pocket
  • Share on LinkedIn
  • Send email

RSS (Rich Site Summary) is a widely used standard format to deliver regularly changing web content. Many sites and blogs syndicate their content as RSS feeds. People subscribing to feeds saves time, stays informed and enjoys greater privacy (no ads, no cookies).

In this blog post we show you how we created the RSS feed for our own blog (yep, this blog), using a restdb.io database and just a few lines of code in a restdb.io Page.

The very first step is to create a restdb.io database and a collection to hold the blog posts. This should normally only take a few minutes. I will not cover how to do that here. Read more about that in our quick start guide.

Here you see how it looks when you edit a database record (blog post) with the content for this article (a bit meta...I know).


Now we have a database, a collection of blog posts and a REST API (automatically generated). On our blog, we use Javascript Ajax and the REST API to fetch and display the articles on our web. We will not do that now. Instead we will use a new capability now available in restdb.io Pages: support for any content type.

In restdb.io, we create a new Page called "feed". It's written using XML and HandlebarsJS markup. The {{#context}} tag fetches the restdb.io data we need for this view, which is all published "posts" from the "post" collection sorted by the newest blogpost first. Then we use {{#each}} to loop through all the records and render the correct XML markup for each blog item. 

Below, you see the code in the Pages editor.


Now, we need to set the right content type. To set this, we go to the "Settings" of the page. In this case the content type could be application/rss+xml or simply text/xml. We chose the latter. The final step is to get this out on the web so that people can start consuming our blog posts. To do that, we must make the Page public. 


That's it! 

You can view or subscribe to the feed here: https://ras-blogdb.restdb.io/public/feed 

restdb.io Pages can be used for many other purposes and output your database data in all sorts of formats: XML, HTML, JSON, microformats, VCARD. It is also a nice way to expose a set of data without sharing with the endpoint consumers any details about the collection or query used.
  • Share on Facebook
  • Tweet
  • Add to Pocket
  • Share on LinkedIn
  • Send email

All Posts


Search

Topics

  • API
  • Authentication
  • Case study
  • Features
  • Howto
  • Integrations
  • Newsletter
  • Productivity
  • Prototyping
  • Tutorials
  • User

restdb.io is a fast and simple NoSQL cloud database service. With restdb.io you get schema, relations, REST API and an efficient multi-user admin UI for working with data.

Our customers use it for backends, business databases, API-first CMS, data collection and much more. It is easy to get started with the free development plan.

Start Building »

  • Site Links
  • Home Page
  • About Us
  • Contact
  • Blog
  • Templates Catalog
  • Cloud Service
  • Features
  • Pricing
  • Terms & Conditions
  • Privacy Policy
  • Sign Up »
  • Documentation
  • Overview
  • Getting Started
  • Coding against the API
  • Utils
  • Security and Admin
© 2025 restdb.io