<?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: Sidharth </title>
    <description>The latest articles on DEV Community by Sidharth  (@sid555).</description>
    <link>https://dev.to/sid555</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%2F1440000%2F0ca39dc3-9a69-415a-9fac-c9b1d42fb166.jpg</url>
      <title>DEV Community: Sidharth </title>
      <link>https://dev.to/sid555</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sid555"/>
    <language>en</language>
    <item>
      <title>Express res.locals Property</title>
      <dc:creator>Sidharth </dc:creator>
      <pubDate>Sun, 28 Apr 2024 06:56:34 +0000</pubDate>
      <link>https://dev.to/sid555/express-reslocals-property-4afe</link>
      <guid>https://dev.to/sid555/express-reslocals-property-4afe</guid>
      <description>&lt;p&gt;The &lt;code&gt;res.locals&lt;/code&gt; property is an object that holds response local variables specific to the current request. It has a scope limited to the request and is accessible only to the view(s) rendered during that particular request/response cycle, if any. &lt;/p&gt;

&lt;p&gt;Basically if you have to pass many local variables to the rendering page then you can store all of them as res.locals object&lt;/p&gt;

&lt;p&gt;See the code below/////////////&lt;/p&gt;

&lt;p&gt;const express = require('express');&lt;br&gt;
const app = express();&lt;br&gt;
const PORT = 3000;&lt;/p&gt;

&lt;p&gt;app.get('/',function (req, res) {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    // Sending multiples locals

    res.locals.name = 'sid';

    res.locals.age = 21;

    res.locals.gender = 'Male'

    console.log(res.locals);

    res.end();

     });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;app.listen(PORT,function (err) {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    if (err) console.log(err);

    console.log(  
    "Server listening on 
          PORT",PORT );

});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
    </item>
    <item>
      <title>Is tensorflow.js is still good to go???</title>
      <dc:creator>Sidharth </dc:creator>
      <pubDate>Sun, 21 Apr 2024 15:59:51 +0000</pubDate>
      <link>https://dev.to/sid555/is-tensorflowjs-is-still-good-to-go-2o78</link>
      <guid>https://dev.to/sid555/is-tensorflowjs-is-still-good-to-go-2o78</guid>
      <description></description>
    </item>
  </channel>
</rss>
