<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Andreas Quist on Medium]]></title>
        <description><![CDATA[Stories by Andreas Quist on Medium]]></description>
        <link>https://medium.com/@andreasquistbatista?source=rss-fb52385f7df0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*xthAGIQNoxzdZfDLtqn2ig.jpeg</url>
            <title>Stories by Andreas Quist on Medium</title>
            <link>https://medium.com/@andreasquistbatista?source=rss-fb52385f7df0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 09:53:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@andreasquistbatista/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Better inclusion of MongoDB in Next.js]]></title>
            <link>https://medium.com/@andreasquistbatista/better-inclusion-of-mongodb-in-next-js-bfb4a872c50e?source=rss-fb52385f7df0------2</link>
            <guid isPermaLink="false">https://medium.com/p/bfb4a872c50e</guid>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Andreas Quist]]></dc:creator>
            <pubDate>Tue, 22 Sep 2020 21:02:02 GMT</pubDate>
            <atom:updated>2020-09-22T21:02:02.820Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve seen a lot of guides out there on how to initiate your database in your Next.js project. I think they’re all wrong!</p><p>I noticed some time ago that serverRuntimeConfig from next/config might be able to help include it as a global variable only available on server side.</p><p>I assume you’ve already spun up your Next.js project and is ready to make it even better.</p><p>Let’s start by creating a database.js in your project root or where you would like it to be placed.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/36c62ba1e2070674c37a923f9a064ad0/href">https://medium.com/media/36c62ba1e2070674c37a923f9a064ad0/href</a></iframe><p>Now with that done we need to create or opennext.config.js in the root folder of the project.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/11c0e6db9ce6a318fc96836b0401d30c/href">https://medium.com/media/11c0e6db9ce6a318fc96836b0401d30c/href</a></iframe><p>Lastly we need to use it in one of our endpoints</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f18fdf4be0f1f64ccbdab4f52f2a7683/href">https://medium.com/media/f18fdf4be0f1f64ccbdab4f52f2a7683/href</a></iframe><p>Good luck!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bfb4a872c50e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>