<?xml version="1.0" encoding="UTF-8"?><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/"
	
	>
<channel>
	<title>
	Comments on: Simple and Easy way to Build a RESTful API using Node.js	</title>
	<atom:link href="https://www.opencodez.com/javascript/build-restful-api-using-node-js.htm/feed" rel="self" type="application/rss+xml" />
	<link>https://www.opencodez.com/javascript/build-restful-api-using-node-js.htm</link>
	<description>develope &#124; share &#124; reuse</description>
	<lastBuildDate>Fri, 15 Jan 2021 11:16:55 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<!--Theme by MyThemeShop.com-->
	<item>
		<title>
		By: Litzer		</title>
		<link>https://www.opencodez.com/javascript/build-restful-api-using-node-js.htm/comment-page-1#comment-100375</link>

		<dc:creator><![CDATA[Litzer]]></dc:creator>
		<pubDate>Fri, 15 Jan 2021 11:16:55 +0000</pubDate>
		<guid isPermaLink="false">https://www.opencodez.com/?p=3602#comment-100375</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.opencodez.com/javascript/build-restful-api-using-node-js.htm/comment-page-1#comment-91885&quot;&gt;Gopal&lt;/a&gt;.

To avoid sql injections, we can parameterize as in example:

    static getProductByIdSQL(prd_id) {
        // let sql = `SELECT * FROM PRODUCTS WHERE PRD_ID = ${prd_id}`;
        return { sql: `SELECT * FROM PRODUCTS WHERE PRD_ID = ??`, values: prd_id };          
    }

Check:
https://github.com/mysqljs/mysql#escaping-query-values
https://github.com/mysqljs/mysql#performing-queries

Hope it helps.

Thanks Pavan for this RESTful example.]]></description>
			<content:encoded><![CDATA[<p>To avoid sql injections, we can parameterize as in example:</p>
<p>    static getProductByIdSQL(prd_id) {<br />
        // let sql = <code>SELECT * FROM PRODUCTS WHERE PRD_ID = ${prd_id}</code>;<br />
        return { sql: <code>SELECT * FROM PRODUCTS WHERE PRD_ID = ??</code>, values: prd_id };<br />
    }</p>
<p>Check:<br />
<a href="https://github.com/mysqljs/mysql#escaping-query-values" rel="nofollow ugc">https://github.com/mysqljs/mysql#escaping-query-values</a><br />
<a href="https://github.com/mysqljs/mysql#performing-queries" rel="nofollow ugc">https://github.com/mysqljs/mysql#performing-queries</a></p>
<p>Hope it helps.</p>
<p>Thanks Pavan for this RESTful example.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Pavan		</title>
		<link>https://www.opencodez.com/javascript/build-restful-api-using-node-js.htm/comment-page-1#comment-94270</link>

		<dc:creator><![CDATA[Pavan]]></dc:creator>
		<pubDate>Wed, 27 Nov 2019 05:53:49 +0000</pubDate>
		<guid isPermaLink="false">https://www.opencodez.com/?p=3602#comment-94270</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.opencodez.com/javascript/build-restful-api-using-node-js.htm/comment-page-1#comment-94260&quot;&gt;Justin&lt;/a&gt;.

Hi Justin,
The code aberu is using like &quot;import * from http&quot;

I did not see in the article or code from article any way like that. More over the code in the article is tested and working. Please let me know if you facing any issues with the code and I will be happy to re-check and update the code/article.]]></description>
			<content:encoded><![CDATA[<p>Hi Justin,<br />
The code aberu is using like &#8220;import * from http&#8221;</p>
<p>I did not see in the article or code from article any way like that. More over the code in the article is tested and working. Please let me know if you facing any issues with the code and I will be happy to re-check and update the code/article.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Justin		</title>
		<link>https://www.opencodez.com/javascript/build-restful-api-using-node-js.htm/comment-page-1#comment-94260</link>

		<dc:creator><![CDATA[Justin]]></dc:creator>
		<pubDate>Tue, 26 Nov 2019 18:53:27 +0000</pubDate>
		<guid isPermaLink="false">https://www.opencodez.com/?p=3602#comment-94260</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.opencodez.com/javascript/build-restful-api-using-node-js.htm/comment-page-1#comment-92966&quot;&gt;Pavan&lt;/a&gt;.

shouldn&#039;t you update the article to include the working code that abreu suggested?]]></description>
			<content:encoded><![CDATA[<p>shouldn&#8217;t you update the article to include the working code that abreu suggested?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: binario		</title>
		<link>https://www.opencodez.com/javascript/build-restful-api-using-node-js.htm/comment-page-1#comment-93576</link>

		<dc:creator><![CDATA[binario]]></dc:creator>
		<pubDate>Tue, 08 Oct 2019 21:59:06 +0000</pubDate>
		<guid isPermaLink="false">https://www.opencodez.com/?p=3602#comment-93576</guid>

					<description><![CDATA[sql injections?]]></description>
			<content:encoded><![CDATA[<p>sql injections?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Pavan		</title>
		<link>https://www.opencodez.com/javascript/build-restful-api-using-node-js.htm/comment-page-1#comment-92966</link>

		<dc:creator><![CDATA[Pavan]]></dc:creator>
		<pubDate>Thu, 29 Aug 2019 04:53:03 +0000</pubDate>
		<guid isPermaLink="false">https://www.opencodez.com/?p=3602#comment-92966</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.opencodez.com/javascript/build-restful-api-using-node-js.htm/comment-page-1#comment-92954&quot;&gt;abreu&lt;/a&gt;.

Hi Abreu,
Glad you found it useful and able to use it.]]></description>
			<content:encoded><![CDATA[<p>Hi Abreu,<br />
Glad you found it useful and able to use it.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/

Object Caching 41/43 objects using disk
Page Caching using disk: enhanced 
Database Caching 1/13 queries in 0.022 seconds using disk

Served from: www.opencodez.com @ 2026-06-28 08:13:00 by W3 Total Cache
-->