<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Samuel Bartík</title>
    <description>The latest articles on DEV Community by Samuel Bartík (@sambartik).</description>
    <link>https://dev.to/sambartik</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F837612%2F0c24a979-12ee-45f6-b38f-655ff1437f75.png</url>
      <title>DEV Community: Samuel Bartík</title>
      <link>https://dev.to/sambartik</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sambartik"/>
    <language>en</language>
    <item>
      <title>What encryption algorithm to choose for a private key?</title>
      <dc:creator>Samuel Bartík</dc:creator>
      <pubDate>Sat, 08 Apr 2023 18:20:01 +0000</pubDate>
      <link>https://dev.to/sambartik/what-encryption-algorithm-to-choose-for-a-private-key-3f3p</link>
      <guid>https://dev.to/sambartik/what-encryption-algorithm-to-choose-for-a-private-key-3f3p</guid>
      <description>&lt;p&gt;Hello everyone! &lt;/p&gt;

&lt;p&gt;I am having trouble finding which encryption algorithm to use for my local CA private key storage. I am not sure where to find up-to-date information, since most stack overflow questions have been asked many years ago. &lt;/p&gt;

&lt;p&gt;Based on my research, I am currently deciding between AES-256 and 3DES (des-ede3-cbc). Am I in the right ballpark?&lt;/p&gt;

&lt;p&gt;Do you have any resources where I can look up up-to-date recommendations for security related stuff? &lt;/p&gt;

&lt;p&gt;Thank you!&lt;/p&gt;

</description>
      <category>help</category>
      <category>security</category>
      <category>discuss</category>
    </item>
    <item>
      <title>How do you build backend API for Next.js apps?</title>
      <dc:creator>Samuel Bartík</dc:creator>
      <pubDate>Thu, 28 Apr 2022 16:55:52 +0000</pubDate>
      <link>https://dev.to/sambartik/how-do-you-build-backend-api-for-nextjs-apps-57cg</link>
      <guid>https://dev.to/sambartik/how-do-you-build-backend-api-for-nextjs-apps-57cg</guid>
      <description>&lt;p&gt;Do you use the Next.js own router and create routes under the API folder? Do you use a custom server? Or do you create your own backend server, serve the next.js as usual - via the built-in server and use a reverse proxy in front of them?&lt;/p&gt;

&lt;p&gt;Of course, the approach would differ based on what we are trying to do. Have you got any preferences, though?&lt;/p&gt;

&lt;p&gt;And what approach would you opt for, if you'd want to create an ecommerce in Next.js with a heftier backend?&lt;/p&gt;

&lt;p&gt;Let's discuss!&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>nextjs</category>
      <category>node</category>
    </item>
    <item>
      <title>Next.js: Custom server and Automatic Static Optimization</title>
      <dc:creator>Samuel Bartík</dc:creator>
      <pubDate>Sat, 23 Apr 2022 21:58:32 +0000</pubDate>
      <link>https://dev.to/sambartik/custom-server-and-automatic-static-optimization-3bpb</link>
      <guid>https://dev.to/sambartik/custom-server-and-automatic-static-optimization-3bpb</guid>
      <description>&lt;p&gt;Hello everyone!&lt;/p&gt;

&lt;p&gt;I am having trouble understanding why &lt;a href="https://nextjs.org/docs/advanced-features/custom-server"&gt;in the docs&lt;/a&gt; it is stated that having a custom server disables &lt;a href="https://nextjs.org/docs/advanced-features/automatic-static-optimization"&gt;&lt;em&gt;Automatic Static Optimization&lt;/em&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Before deciding to use a custom server, please keep in mind that it should only be used when the integrated router of Next.js can't meet your app requirements. &lt;strong&gt;A custom server will remove important performance optimizations, like serverless functions and Automatic Static Optimization&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;My understanding is that thanks to it, during the build phase (&lt;code&gt;next build&lt;/code&gt;) it will automatically generate an HTML file (for pages that qualify) which will be then served in future requests.&lt;/p&gt;

&lt;p&gt;Now, what is preventing nextjs handler in the custom server from using already generated files from the &lt;code&gt;next build&lt;/code&gt; step and serving them just as the built-in server would?&lt;/p&gt;

&lt;p&gt;I tested serving app with the built-in server (&lt;code&gt;next start&lt;/code&gt;) and with a custom server and I have not found any difference between them, even when it comes to the &lt;em&gt;Automatic Static Optimization&lt;/em&gt;. In both cases, static HTML files were generated for a simple page with no &lt;code&gt;getServerSideProps&lt;/code&gt; or &lt;code&gt;getInitialProps&lt;/code&gt; and it served the page without a problem.&lt;/p&gt;

&lt;p&gt;Have I misunderstood what the &lt;em&gt;Automatic Static Optimization&lt;/em&gt; is really doing? Or something else?&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;

</description>
      <category>help</category>
      <category>nextjs</category>
      <category>javascript</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
