RSS and JSON feeds for Next.JS site

How to add RSS and JSON feeds to your Next.JS site.