<?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 i am invisible sag on Medium]]></title>
        <description><![CDATA[Stories by i am invisible sag on Medium]]></description>
        <link>https://medium.com/@sagarromer?source=rss-98cb6fb8fb97------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ff1TXErp7n_zBHJU</url>
            <title>Stories by i am invisible sag on Medium</title>
            <link>https://medium.com/@sagarromer?source=rss-98cb6fb8fb97------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 04:51:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sagarromer/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[Simple File Server With Node.js]]></title>
            <link>https://medium.com/@sagarromer/simple-file-server-with-node-js-f3bcb28cacc2?source=rss-98cb6fb8fb97------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3bcb28cacc2</guid>
            <category><![CDATA[begineers]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[i am invisible sag]]></dc:creator>
            <pubDate>Fri, 05 Jun 2020 06:45:17 GMT</pubDate>
            <atom:updated>2020-06-05T06:45:17.818Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*nX9OWsGhuWbtk2SHORigKA.jpeg" /></figure><p>Hii guys. I’m Sagara. today I started learning node.js and created a simple web server. I hope this will be helpful for those who wish to learn Node.js.</p><p>let’s say that we need to serve 2 HTML files named <strong>index-1.html </strong>and<strong> index-2.html.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/807/1*mYZSPFQsNBuFK3rjI4D82w.png" /><figcaption><strong>index-1.html</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*R8d6cccuuNdh0qY-b0lnGQ.png" /><figcaption><strong>index-2.html</strong></figcaption></figure><p>To serve these 2 files we need to create an HTTP server that listens to server ports and gives a response back to the client. We can use Use createServer() method to create an HTTP server. The function passes to <strong>http.createserver()</strong> will get executed whenever anyone tries to access the relevant port as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*gxPDTGqQlB1pSJoFdtM_YA.png" /><figcaption><strong>server.js</strong></figcaption></figure><p>code for this simple project will be <a href="https://github.com/sagarromer/node_learn_projects/tree/master/simple_web_server">available at this link.</a> So you can clone the repository and open the webserver project and run with <strong>npm start.</strong> And access the files with a browser. <strong>ex:</strong><a href="http://127.0.0.1:1337/index-2.html"><strong>http://127.0.0.1:1337/index-2.html</strong></a><strong>.</strong></p><p>And if you need more information about node.js modules follow <a href="https://www.w3schools.com/nodejs/nodejs_url.asp">this link.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3bcb28cacc2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>