<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" 
  xmlns:content="http://purl.org/rss/1.0/modules/content/" 
  xmlns:dc="http://purl.org/dc/elements/1.1/" 
  xmlns:atom="http://www.w3.org/2005/Atom" 
  xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" 
  xmlns:media="http://search.yahoo.com/mrss/">
  <channel>
    <title>nodejs on John hashim</title>
    <link>https://johnhashim.com/tags/nodejs/</link>
    <description>Recent content in nodejs on John hashim</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <managingEditor>johnnyhashim [at] gmail.com (john hashim)</managingEditor>
    <webMaster>johnnyhashim [at] gmail.com (john hashim)</webMaster>
    <copyright>&amp;copy;{year}, All Rights Reserved</copyright>
    <lastBuildDate>Fri, 29 Dec 2023 20:23:49 -0400</lastBuildDate>
    
        <atom:link href="https://johnhashim.com/tags/nodejs/index.xml" rel="self" type="application/rss+xml" />
    

      
      <item>
        <title>how to handle form data in your Express application </title>
        <link>https://johnhashim.com/posts/how-to-handle-data-in-express-form/</link>
        <pubDate>Fri, 29 Dec 2023 20:23:49 -0400</pubDate>
        <author>johnnyhashim [at] gmail.com (john hashim)</author>
        <atom:modified>Fri, 29 Dec 2023 20:23:49 -0400</atom:modified>
        <guid>https://johnhashim.com/posts/how-to-handle-data-in-express-form/</guid>
        <description>Handling data from an HTML form in an Express application involves a few key steps. Here&amp;rsquo;s a straightforward guide to get you started:
1. Set Up Your Express App First, ensure you have Node.js and Express installed. Then, set up your basic Express app:
1 2  const express = require(&amp;#39;express&amp;#39;); const app = express();   2. Use Middleware to Parse Request Body Before your app can handle form data, it needs to parse the incoming request bodies.</description>
        
        <dc:creator>john hashim</dc:creator>
        <media:content url="https://johnhashim.com/images/feature2/content.png" medium="image"><media:title type="html">featured image</media:title></media:content>
        
        
        
          
            
              <category>nodejs</category>
            
          
        
        
          
            
              <category>programing</category>
            
          
            
              <category>dev</category>
            
          
        
        
      </item>
      
      <item>
        <title>How to append or writable stream to a file in Nodejs?</title>
        <link>https://johnhashim.com/posts/how-to-append-to-a-file-in-nodejs/</link>
        <pubDate>Thu, 13 Aug 2020 22:41:09 -0400</pubDate>
        <author>johnnyhashim [at] gmail.com (john hashim)</author>
        <atom:modified>Thu, 13 Aug 2020 22:41:09 -0400</atom:modified>
        <guid>https://johnhashim.com/posts/how-to-append-to-a-file-in-nodejs/</guid>
        <description>What is a nodejs streams? Streams are collections of data — just like arrays or strings. The difference is that streams might not be available all at once, and they don’t have to fit in memory. This makes streams really powerful when working with large amounts of data, or data that’s coming from an external source one chunk at a time.
If you want to write to a file without having to read from it and rewrite the data again and again this would be the solution.</description>
        
        <dc:creator>john hashim</dc:creator>
        <media:content url="https://johnhashim.com/images/feature2/workflow.png" medium="image"><media:title type="html">featured image</media:title></media:content>
        
        
        
          
            
              <category>nodejs</category>
            
          
        
        
          
            
              <category>programming</category>
            
          
        
        
          
            
              <category>nodejs</category>
            
          
        
      </item>
      
      <item>
        <title>How to Swap Two Array Element in Javascript</title>
        <link>https://johnhashim.com/posts/how-to-swap-two-array-element-in-javascript/</link>
        <pubDate>Thu, 13 Aug 2020 22:41:09 -0400</pubDate>
        <author>johnnyhashim [at] gmail.com (john hashim)</author>
        <atom:modified>Thu, 13 Aug 2020 22:41:09 -0400</atom:modified>
        <guid>https://johnhashim.com/posts/how-to-swap-two-array-element-in-javascript/</guid>
        <description>working with javascript array swap it a way to order your array items in the oder that you want your data to be consumed or display .. the snippets bellow may help you archive that.
quick way 1 2 3 4 5 6 7 8 9 10  let days = [&amp;#34;Sunday&amp;#34;,&amp;#34;Monday&amp;#34;,&amp;#34;Friday&amp;#34;,&amp;#34;Wednesday&amp;#34;,&amp;#34;Thursday&amp;#34;,&amp;#34;Tuesday&amp;#34;,&amp;#34;Saturday&amp;#34;]; let temp = days[2]; days[2] = days[5]; days[5] = temp; console.log(days) //    1 2 3 4 5  const days = [&amp;#34;Sunday&amp;#34;,&amp;#34;Monday&amp;#34;,&amp;#34;Friday&amp;#34;,&amp;#34;Wednesday&amp;#34;,&amp;#34;Thursday&amp;#34;,&amp;#34;Tuesday&amp;#34;,&amp;#34;Saturday&amp;#34;]; [days[3], days[4]] = [days[4], days[3]] //   swap function if it something that will be done regulary its better to create a function and reuse it .</description>
        
        <dc:creator>john hashim</dc:creator>
        <media:content url="https://johnhashim.com/images/feature2/workflow.png" medium="image"><media:title type="html">featured image</media:title></media:content>
        
        
        
          
            
              <category>nodejs</category>
            
          
        
        
          
            
              <category>programming</category>
            
          
        
        
      </item>
      
      <item>
        <title>write and read streams everything you need to know?</title>
        <link>https://johnhashim.com/posts/nodejs-streams-you-need-to-know/</link>
        <pubDate>Thu, 13 Aug 2020 22:41:09 -0400</pubDate>
        <author>johnnyhashim [at] gmail.com (john hashim)</author>
        <atom:modified>Thu, 13 Aug 2020 22:41:09 -0400</atom:modified>
        <guid>https://johnhashim.com/posts/nodejs-streams-you-need-to-know/</guid>
        <description>node js Streams are collections of data — just like arrays or strings. The difference is that streams might not be available all at once, and they don’t have to fit in memory. This makes streams really powerful when working with large amounts of data, or data that’s coming from an external source one chunk at a time.
createwritstream file.txt terminal sever  1 2 3 4 5 6 7 8  const fs = require(&amp;#39;fs&amp;#39;); const file = fs.</description>
        
        <dc:creator>john hashim</dc:creator>
        <media:content url="https://johnhashim.com/images/feature2/workflow.png" medium="image"><media:title type="html">featured image</media:title></media:content>
        
        
        
          
            
              <category>nodejs</category>
            
          
        
        
          
            
              <category>programming</category>
            
          
        
        
          
            
              <category>nodejs</category>
            
          
        
      </item>
      
      <item>
        <title>Accepts an Http POST Request That Would Then Write to the Same Csv</title>
        <link>https://johnhashim.com/posts/accepts-an-http-post-request-that-would-then-write-to-the-same-csv/</link>
        <pubDate>Thu, 13 Aug 2020 21:23:49 -0400</pubDate>
        <author>johnnyhashim [at] gmail.com (john hashim)</author>
        <atom:modified>Thu, 13 Aug 2020 21:23:49 -0400</atom:modified>
        <guid>https://johnhashim.com/posts/accepts-an-http-post-request-that-would-then-write-to-the-same-csv/</guid>
        <description>how to create a webserver That accepts an http POST request that would then write to the same CSV.
Thanks to my boss whose been teaching me nodejs for years now im finally familliar with POST request.  In this post we will create a websocket that will accepts an http POST requestthen write to CSV file in a nonede stream.
POST is how we send data to a server, generally putting the content in the body of the request.</description>
        
        <dc:creator>john hashim</dc:creator>
        <media:content url="https://johnhashim.com/images/feature2/content.png" medium="image"><media:title type="html">featured image</media:title></media:content>
        
        
        
          
            
              <category>nodejs</category>
            
          
        
        
          
            
              <category>programing</category>
            
          
            
              <category>dev</category>
            
          
        
        
      </item>
      

    
  </channel>
</rss>