<?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: SomervilleTom</title>
    <description>The latest articles on DEV Community by SomervilleTom (@somervilletom).</description>
    <link>https://dev.to/somervilletom</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%2F1092658%2Fbe52e699-0a35-4beb-b861-966072382ddd.png</url>
      <title>DEV Community: SomervilleTom</title>
      <link>https://dev.to/somervilletom</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/somervilletom"/>
    <language>en</language>
    <item>
      <title>No deployment to HTTPS?</title>
      <dc:creator>SomervilleTom</dc:creator>
      <pubDate>Fri, 01 Sep 2023 12:26:28 +0000</pubDate>
      <link>https://dev.to/somervilletom/no-deployment-to-https-mmg</link>
      <guid>https://dev.to/somervilletom/no-deployment-to-https-mmg</guid>
      <description>&lt;p&gt;ANY production-ready web service must support HTTPS.&lt;/p&gt;

&lt;p&gt;Surely it is not controversial to assert that it should be easy for "deployment" -- as in &lt;code&gt;yarn build&lt;/code&gt;, for example, -- to result in a service that uses HTTPS (as opposed HTTP) on the designated port. Now that CRA is dead, I find no practical way to accomplish this using React.&lt;/p&gt;

&lt;p&gt;The stance taken by the &lt;a href="https://react.dev/learn/start-a-new-react-project"&gt;official React documentation&lt;/a&gt; is misleading at at best:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Next.js is maintained by Vercel. You can deploy a Next.js app to any Node.js or serverless hosting, or to your own server. Fully static Next.js apps can be deployed to any static hosting.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I've spent the last few days trying to make the simple out-of-the-box &lt;code&gt;create-next-app&lt;/code&gt; from &lt;code&gt;next.js&lt;/code&gt; run on https. So far as I can tell, according to the &lt;code&gt;next.js&lt;/code&gt; site and its several online communities, the only way to support https is to &lt;strong&gt;host the site on vercel&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That is unacceptable.&lt;/p&gt;

&lt;p&gt;For all its flaws, the approach used by CRA was elegant and worked. All that was needed was to run &lt;code&gt;yarn build&lt;/code&gt; and point a properly configured &lt;code&gt;httpd&lt;/code&gt; (I use Apache) service at the resulting build directory.&lt;/p&gt;

&lt;p&gt;While it is possible to do a "static" build this way, that results in significant loss of needed behavior.&lt;/p&gt;

&lt;p&gt;I understand why CRA was deprecated. I am disappointed that the alternatives for replacing it do not apparently include an approach that provides &lt;code&gt;https&lt;/code&gt; support comparable to CRA.&lt;/p&gt;

</description>
      <category>react</category>
      <category>nextjs</category>
    </item>
  </channel>
</rss>
