<?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: Pierre</title>
    <description>The latest articles on DEV Community by Pierre (@siglave).</description>
    <link>https://dev.to/siglave</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%2F315717%2F62a418e0-3818-4517-aab9-1a9d3c19cac5.jpg</url>
      <title>DEV Community: Pierre</title>
      <link>https://dev.to/siglave</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/siglave"/>
    <language>en</language>
    <item>
      <title>Hosting providers to deploy your Next.js app</title>
      <dc:creator>Pierre</dc:creator>
      <pubDate>Mon, 09 Jan 2023 18:59:18 +0000</pubDate>
      <link>https://dev.to/siglave/hosting-providers-to-deploy-your-nextjs-app-3df2</link>
      <guid>https://dev.to/siglave/hosting-providers-to-deploy-your-nextjs-app-3df2</guid>
      <description>&lt;h2&gt;
  
  
  Vercel
&lt;/h2&gt;

&lt;p&gt;Vercel is a hosting platform developed by the creators of Next.js. It is an excellent choice for those looking to use the latest features of Next.js with ease. As the creators of Next.js, Vercel is able to provide excellent support for the framework and ensure that users can take advantage of all the latest updates and capabilities.&lt;/p&gt;

&lt;h2&gt;
  
  
  Render
&lt;/h2&gt;

&lt;p&gt;Render offers a variety of features and tools to assist developers in building, deploying, and managing their apps. Some of these features include free TLS certificates, a global CDN, DDoS protection, private networks, and automatic Git deploys.&lt;/p&gt;

&lt;h2&gt;
  
  
  Netlify
&lt;/h2&gt;

&lt;p&gt;If you are looking to deploy a static site with Next.js, Netlify is a strong option to consider. It provides a number of tools for managing and optimizing your site, including A/B testing, form handling, and analytics.&lt;br&gt;
Netlify has developed its own Next.js middleware that allows for HTML rewrites, page data transforms, and access to the response body.&lt;/p&gt;

&lt;h2&gt;
  
  
  Digital Ocean
&lt;/h2&gt;

&lt;p&gt;Digital Ocean App Platform is a fully-managed solution for quickly building, deploying, and scaling apps. It allows you to easily deploy code from your GitHub or GitLab repositories and automatically updates your app whenever you push changes to your source code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Heroku
&lt;/h2&gt;

&lt;p&gt;Heroku offers a variety of features and tools that make it easy to deploy, run, and scale Next.js applications. These features include support for automatic scaling, easy rollbacks, and access to a wide range of add-on services. This makes Heroku a powerful platform for developing and running Next.js apps.&lt;/p&gt;

&lt;h2&gt;
  
  
  AWS Amplify
&lt;/h2&gt;

&lt;p&gt;AWS Amplify is a service that allows you to build and deploy cloud-based web applications. It is a part of the Amazon Web Services (AWS) suite of products and provides easy integration with other AWS services, such as Amazon Cognito for user authentication and Amazon S3 for file storage.&lt;/p&gt;

&lt;h2&gt;
  
  
  Google Cloud App Engine
&lt;/h2&gt;

&lt;p&gt;Google Cloud App Engine is a platform that automatically scales your application based on traffic and demand, and provides load balancing to distribute traffic across multiple instances of your app. It is also integrated with other Google Cloud Platform (GCP) services, such as Cloud Storage, BigQuery, and Cloud Functions, allowing you to easily build and deploy cloud-based applications.&lt;/p&gt;




&lt;p&gt;I'm Pierre the maker of &lt;a href="https://nextjsdevs.net/"&gt;NextJS Devs&lt;/a&gt; a reverse job board for Next.js developers&lt;br&gt;
If you're looking for a Next.js job don't hesitate to create a profile!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>nextjs</category>
      <category>webdev</category>
      <category>react</category>
    </item>
    <item>
      <title>Simple guide to Web Scraping with NodeJS</title>
      <dc:creator>Pierre</dc:creator>
      <pubDate>Thu, 14 Oct 2021 17:00:51 +0000</pubDate>
      <link>https://dev.to/siglave/simple-guide-to-web-scraping-with-nodejs-404k</link>
      <guid>https://dev.to/siglave/simple-guide-to-web-scraping-with-nodejs-404k</guid>
      <description>&lt;p&gt;With one of my projects ( &lt;a href="https://rocketcrew.space"&gt;rocketcrew.space&lt;/a&gt; A job board dedicated to the space industry ), I have to collect job offers on career pages of different companies. Every site is different, but each one can be scraped with one of three methods.&lt;/p&gt;

&lt;h2&gt;
  
  
  1 - Look for an API
&lt;/h2&gt;

&lt;p&gt;The first thing you have to look at when you want to scrape a website is the network tab of the browser dev tools.&lt;br&gt;
Press F12 and go to the "Network" tab. You will be able to see every request that the site is making.&lt;br&gt;
If you're lucky, you can spot an API call that the website is using to get its content information, like job offers for a career page.&lt;br&gt;
So all you have to do is to use the same API request to get the website content. You can use the Axios library for example.&lt;/p&gt;
&lt;h2&gt;
  
  
  2 - Server Side Rendered websites
&lt;/h2&gt;

&lt;p&gt;Some websites are SSR, short for Server Side Rendered. It means that all the HTML page is generated on the backend. So what we want to scrape can be found directly in the HTML, we just have to parse it.&lt;/p&gt;

&lt;p&gt;To do this you can use Axios to get the HTML page, and Cheerio to parse it.&lt;br&gt;
Cheerio allows you to parse the HTML with the same syntax as jQuery.&lt;/p&gt;

&lt;p&gt;Here is a simple example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`https://website-url.com`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;$&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;cheerio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;description&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#description&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;html&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3 - Client-Side Rendered websites
&lt;/h2&gt;

&lt;p&gt;The last type of site you can encounter is a SPA ( Single Page Application ). In that case, the server only sends a basic HTML file and the rest of the site is generated with Javascript, client-side.&lt;br&gt;
In that case, we cannot use the previous method because the GET request would only return a basic HTML file without its content.&lt;br&gt;
So to scrape this kind of site, we have to simulate a browser in the backend to allow Javascript to generate the website content.&lt;br&gt;
With NodeJS, we can use Puppeteer, which will allow us to create, and control a Chrome browser.&lt;/p&gt;

&lt;p&gt;Here is a little example to get a page h1 text.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;browser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;puppeteer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;launch&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;browser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;newPage&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;goto&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://website-url.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;pageTitle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;evaluate&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;h1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;textContent&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;browser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;close&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let me know if you have any questions!&lt;/p&gt;

&lt;p&gt;Follow me on Twitter If you want to learn how I am building RocketCrew!&lt;br&gt;
&lt;a href="https://twitter.com/siglavesc2"&gt;https://twitter.com/siglavesc2&lt;/a&gt;&lt;/p&gt;

</description>
      <category>node</category>
      <category>javascript</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>A curated list of buttons and box-shadows for your next project!</title>
      <dc:creator>Pierre</dc:creator>
      <pubDate>Wed, 30 Jun 2021 14:46:24 +0000</pubDate>
      <link>https://dev.to/siglave/a-curated-list-of-buttons-and-box-shadows-for-your-next-project-22pa</link>
      <guid>https://dev.to/siglave/a-curated-list-of-buttons-and-box-shadows-for-your-next-project-22pa</guid>
      <description>&lt;p&gt;Hello!&lt;/p&gt;

&lt;p&gt;Here is my latest little project to help you find inspiration for your next button and box-shadow design. I also include a link to some design systems.&lt;br&gt;
&lt;a href="https://copy-paste-css.com/"&gt;https://copy-paste-css.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let me know if you are aware of some interesting button designs that I could include on the site!&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>css</category>
      <category>html</category>
      <category>design</category>
    </item>
  </channel>
</rss>
