<?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: S. M. Ahad Ali Chowdhury</title>
    <description>The latest articles on DEV Community by S. M. Ahad Ali Chowdhury (@ahadalichowdhury).</description>
    <link>https://dev.to/ahadalichowdhury</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%2F745402%2F48cedbff-14b3-4b50-b48a-28f5873c15c5.jpeg</url>
      <title>DEV Community: S. M. Ahad Ali Chowdhury</title>
      <link>https://dev.to/ahadalichowdhury</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ahadalichowdhury"/>
    <language>en</language>
    <item>
      <title>What is OG (open graph )? And what will we use it for!</title>
      <dc:creator>S. M. Ahad Ali Chowdhury</dc:creator>
      <pubDate>Mon, 11 Sep 2023 22:02:48 +0000</pubDate>
      <link>https://dev.to/ahadalichowdhury/what-is-og-open-graph-and-what-will-we-use-it-for-2md1</link>
      <guid>https://dev.to/ahadalichowdhury/what-is-og-open-graph-and-what-will-we-use-it-for-2md1</guid>
      <description>&lt;p&gt;OG (Open Graph) tags are used as meta tags. The purpose of using OG is when we share a website's link on social platforms, it helps display a beautiful preview of our website. For example, when sharing a link on Facebook, it can show a nice title and the Facebook logo, as shown in the screenshot below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kUThgErU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/21tpy8vmc2zk4rpy1f52.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kUThgErU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/21tpy8vmc2zk4rpy1f52.jpg" alt="Image description" width="800" height="1019"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;OG tags are primarily used for this purpose.To use these meta tags on your website, you can include them in the HTML head section like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;head&amp;gt;
  &amp;lt;meta property="og:title" content="Your Page Title" /&amp;gt;
  &amp;lt;meta property="og:description" content="Description of your page." /&amp;gt;
  &amp;lt;meta property="og:image" content="URL of your featured image or logo." /&amp;gt;
  &amp;lt;meta property="og:url" content="URL of your webpage." /&amp;gt;
&amp;lt;/head&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This helps improve the appearance and information presented when your website links are shared on social media.&lt;/p&gt;

</description>
      <category>og</category>
      <category>webdev</category>
      <category>metatag</category>
    </item>
    <item>
      <title>React js Input Field test using Jest and Enzyme</title>
      <dc:creator>S. M. Ahad Ali Chowdhury</dc:creator>
      <pubDate>Thu, 07 Sep 2023 13:50:21 +0000</pubDate>
      <link>https://dev.to/ahadalichowdhury/react-js-input-field-test-using-jest-and-enzyme-29g9</link>
      <guid>https://dev.to/ahadalichowdhury/react-js-input-field-test-using-jest-and-enzyme-29g9</guid>
      <description>&lt;p&gt;testing the input field with jest and enzyme&lt;br&gt;
first take a input field in your react js file like this&lt;br&gt;
&amp;lt;input&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;        type="text"
        value={inputValue}
        onChange={handleChange}
        className='inputfield'
      /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;for this input field, take handleChange function , and a useState for the input Value , like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const [inputValue, setInputValue] = useState('');

  const handleChange = (event) =&amp;gt; {
    setInputValue(event.target.value);
  };
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;this take the input from the user,&lt;/p&gt;

&lt;p&gt;Now here, i want write test file for this input field,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;it('updates input value on change', () =&amp;gt; {
    const wrapper = shallow(&amp;lt;App /&amp;gt;);
    const input = wrapper.find('.inputfield');
    input.simulate('change', { target: { value: 'ahad' } });
    const refoundInput = wrapper.find(".inputfield")
    expect(refoundInput.props().value).toEqual("ahad");
  });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;here the explain&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;const wrapper = shallow(&amp;lt;App /&amp;gt;);&lt;/code&gt;&lt;br&gt;
    It starts by shallow rendering the App component, which means it renders the component without rendering its children or diving deep into the component tree. This allows you to isolate your testing to the behavior of the App component itself.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;const input = wrapper.find('.inputfield');&lt;/code&gt;&lt;br&gt;
    It finds an input element with a CSS class of "inputfield" within the rendered App component. This is assuming that your input field has a class attribute set to "inputfield."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;input.simulate('change', { target: { value: 'ahad' } });&lt;/code&gt;&lt;br&gt;
    It simulates a change event on the found input field and sets its value to 'ahad'. This simulates a user typing 'ahad' into the input field.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;const refoundInput = wrapper.find(".inputfield");&lt;/code&gt;&lt;br&gt;
    It finds the input element again after the simulated change event. This step is necessary because the input variable from step 2 may not reflect the updated state of the input field after the simulated change event.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;expect(refoundInput.props().value).toEqual("ahad");&lt;/code&gt;&lt;br&gt;
    It uses an assertion to check whether the value prop of the input field, which was found again in step 4, is equal to 'ahad'. This ensures that the input field's value has been updated correctly in response to the simulated change event.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>webdev</category>
      <category>testing</category>
      <category>unittest</category>
    </item>
    <item>
      <title>Create a contact page api with Laravel</title>
      <dc:creator>S. M. Ahad Ali Chowdhury</dc:creator>
      <pubDate>Sun, 12 Jun 2022 17:41:43 +0000</pubDate>
      <link>https://dev.to/ahadalichowdhury/create-a-contact-page-api-with-laravel-1adp</link>
      <guid>https://dev.to/ahadalichowdhury/create-a-contact-page-api-with-laravel-1adp</guid>
      <description>&lt;p&gt;step No-1&lt;br&gt;
Create a migration . For this go to the code editor terminal and write&lt;br&gt;
&lt;em&gt;&lt;strong&gt;php artisan make:Migration contactMigration&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
this command create a new file. go to this file and write this code in up() function like that&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;public function up()&lt;br&gt;
{&lt;br&gt;
         Schema::create ('contact', function (Blueprint $table){&lt;br&gt;
                       $table-&amp;gt;bigIncrements('id');&lt;br&gt;
                       $table-&amp;gt;string('name');&lt;br&gt;
                       $table-&amp;gt;string('mobile');&lt;br&gt;
                       $table-&amp;gt;string('message', 1000);&lt;br&gt;
                       $table-&amp;gt;string('contact_date');&lt;br&gt;
                       $table-&amp;gt;string('contact_time');&lt;br&gt;
                });&lt;br&gt;
}&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;after that, again go to the code editor terminal and run this command: &lt;strong&gt;&lt;em&gt;php artisan migrate&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;step 1 completed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step No-2&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;create model&lt;br&gt;
&lt;strong&gt;&lt;em&gt;php artisan make:Model contactModel(your model name)&lt;/em&gt;&lt;/strong&gt; run this command in your code editor terminal.this command create a file. write code like below in this file&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;class contactModel extends Model&lt;br&gt;
{&lt;br&gt;
public $table='contact';&lt;br&gt;
public $primaryKey='id';&lt;br&gt;
protected $fillable = ['name', 'mobile', 'message', &lt;br&gt;
 'contact_date', 'contact_time'];&lt;br&gt;
public $incrementing=true;&lt;br&gt;
public $keyType='int';&lt;br&gt;
public $timestamps=false;&lt;br&gt;
};&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;step No 2 completed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;step No-3:&lt;/strong&gt;&lt;br&gt;
create controller&lt;br&gt;
&lt;strong&gt;php artisan make:Controller contactController(your Controller name)&lt;/strong&gt;&lt;br&gt;
after make controller,&lt;br&gt;
in this controller import contactmodel for inserting data in database . Like&lt;br&gt;
use App\Models\contactModel;&lt;/p&gt;

&lt;p&gt;and then&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;class contactController extends Controller&lt;br&gt;
{&lt;br&gt;
function getContactDetails(Request $request){&lt;br&gt;
$name = $request-&amp;gt;input('name');&lt;br&gt;
$mobile= $request-&amp;gt;input('mobile');&lt;br&gt;
$message= $request-&amp;gt;input('message');&lt;br&gt;
date_default_timezone_set("Asia/Dhaka");&lt;br&gt;
$contact_time = date("h:i:sa");&lt;br&gt;
$contact_date= date("d-m-Y");&lt;br&gt;
  $result = contactMode::insert([&lt;br&gt;
        "name"=&amp;gt; $name,&lt;br&gt;
        "mobile"=&amp;gt; $mobile,&lt;br&gt;
        "message"=&amp;gt; $message,&lt;br&gt;
        "contact_date"=&amp;gt; $contact_date,&lt;br&gt;
        "contact_time"=&amp;gt; $contact_time,&lt;br&gt;
 ]);&lt;br&gt;
        return $result;&lt;br&gt;
}&lt;br&gt;
}&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;step No 3 done.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step No-4:&lt;/strong&gt;&lt;br&gt;
this data use only for client site. that's why we go to the route&amp;gt;api.php and than&lt;br&gt;
create new route&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Route::post("/getContactDetails", {contactController::class, 'getContactDetails'});&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;and also you should import the contactcontroller class path in top of the api.php.&lt;/p&gt;

&lt;p&gt;for this &lt;strong&gt;use App\Http\Controllers\contactController;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;step No 4 done.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;step No 5:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Go to client code and go to the contact page.&lt;br&gt;
Create a state for name, mobile and message option. like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;this.state={&lt;br&gt;
       name: "",&lt;br&gt;
       mobile:"",&lt;br&gt;
       message:""&lt;br&gt;
}&lt;br&gt;
Then we should have to create a onChange for the input value. onChange function like that:&lt;/p&gt;

&lt;p&gt;nameOnChange=(event)=&amp;gt;{&lt;br&gt;
        let name = event.target.value;&lt;br&gt;
        this.setState(name:name);&lt;br&gt;
}&lt;br&gt;
mobileOnChange=(event)=&amp;gt;{&lt;br&gt;
        let mobile = event.target.value;&lt;br&gt;
        this.setState(mobile: mobile);&lt;br&gt;
}&lt;br&gt;
messageOnChange=(event)=&amp;gt;{&lt;br&gt;
        let message= event.target.value;&lt;br&gt;
        this.setState(message: message);&lt;br&gt;
}&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For submitting this form. We create a onSubmit function. Like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;onsubmit=(event)=&amp;gt;{&lt;br&gt;
    let name = this.state.name;&lt;br&gt;
    let mobile= this.state.mobile;&lt;br&gt;
    let message= this.state.message;&lt;br&gt;
    //if we want to create some regex for this three input field.&lt;br&gt;&lt;br&gt;
      we implement this in new file like regex.js file.&lt;br&gt;
      then create condition here&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if(expression)
{   //code here}
else{
    let myFormData = new FormData();
    myFormData.append("name", name);
    myFormData.append("mobile", mobile);
    myFormData.append("message", message);

    axios.get(url.getContactDetails, myFormData)
    .then(function(response)=&amp;gt;{
           if(response.status==200 &amp;amp;&amp;amp; response.data==1){
                alert("ok");
           }else{
                 alert("error");//we can use react toast
                                  dependency for  nice view

           }          
    })
    .catch(function(err){
        alert(err);//we can use react toast dependency for 
                   nice view
    });
}
event.preventDefault();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;step No 5 done.&lt;/p&gt;

&lt;p&gt;done this work.....&lt;br&gt;
Happy coding&lt;/p&gt;

</description>
    </item>
    <item>
      <title>laravel visitor details catch</title>
      <dc:creator>S. M. Ahad Ali Chowdhury</dc:creator>
      <pubDate>Mon, 06 Jun 2022 18:31:29 +0000</pubDate>
      <link>https://dev.to/ahadalichowdhury/laravel-visitor-details-catch-41ng</link>
      <guid>https://dev.to/ahadalichowdhury/laravel-visitor-details-catch-41ng</guid>
      <description>&lt;p&gt;Suppose you want to save visitor details who visit your website...&lt;br&gt;
You have to do something for this &lt;br&gt;
&lt;strong&gt;Step No-1:&lt;/strong&gt;&lt;br&gt;
go to code editor terminal and type&lt;br&gt;
&lt;strong&gt;&lt;em&gt;php artisan make:Migration (your table name)&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
Then go to migration file which you make just now&lt;br&gt;
then code something in up function &lt;br&gt;
Here is some example&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Schema::create("your table name", function (Blueprint $table){&lt;br&gt;
              //$table-&amp;gt;your data type here("column name");&lt;br&gt;
          $table-&amp;gt;bigIncrements("id");&lt;br&gt;
          $table-&amp;gt;string("ip_address");&lt;br&gt;
          $table-&amp;gt;string("visit_time");&lt;br&gt;
          $table-&amp;gt;string("visit_date");&lt;br&gt;
}&lt;br&gt;
go to code editor terminal again and type &lt;br&gt;
&lt;strong&gt;&lt;em&gt;php artisan migrate&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;step 1 done&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;step No-2&lt;/strong&gt;&lt;br&gt;
create model&lt;br&gt;
&lt;strong&gt;&lt;em&gt;php artisan make:Model (your model name)&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;class VisitorModel extends Model&lt;br&gt;
{&lt;br&gt;
    public $table='Visitor';&lt;br&gt;
    public $primaryKey='id';&lt;br&gt;
    protected $fillable = ['ip_address', 'visit_time'];&lt;br&gt;
    public $incrementing=true;&lt;br&gt;
    public $keyType='int';&lt;br&gt;
    public  $timestamps=false;&lt;br&gt;
};&lt;br&gt;
**&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;step 2 done&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;step No-3&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;create controller&lt;br&gt;
&lt;strong&gt;&lt;em&gt;php artisan make:Controller (your Controller name)&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
after make controller,&lt;br&gt;
in this controller &lt;strong&gt;import visitormodel&lt;/strong&gt; for inserting data in database . Like&lt;br&gt;
&lt;strong&gt;use App\Models\VisitorModel;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;and then&lt;br&gt;
**&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;class VisitorController extends Controller&lt;br&gt;
{&lt;br&gt;
    function getVisitorDetails(){&lt;br&gt;
       $ip_address = $_SERVER['REMOTE_ADDR'];&lt;br&gt;
       date_default_timezone_set("Asia/Dhaka");&lt;br&gt;
       $visit_time = date("h:i:sa");&lt;br&gt;
       $visit_date= date("d-m-Y");&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  $result = VisitorMode::insert([
        "ip_address"=&amp;gt; $ip_address,
        "visit_time"=&amp;gt; $visit_time,
         "visit_date"=&amp;gt; $visit_date,
 ]);

        return $result;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;}&lt;br&gt;
}&lt;br&gt;
**&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;step 3 done&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;step No-4&lt;/strong&gt;&lt;br&gt;
this data use only for client site. that's why we go to the route&amp;gt;api.php and than&lt;br&gt;
create new route&lt;br&gt;
&lt;strong&gt;&lt;em&gt;Route::get("/getvisitordetails", {VisitorController::class, 'getVisitorDetails'});&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
and also you should import the visitorcontroller class path in top of the api.php.&lt;/p&gt;

&lt;p&gt;for this use &lt;strong&gt;App\Http\Controllers\VisitorController;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;step 4 done&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;step No-5&lt;/strong&gt;&lt;br&gt;
test the route&lt;br&gt;
go to postman and test this route.&lt;/p&gt;

&lt;p&gt;step 5 is done......&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step No_6:&lt;/strong&gt;&lt;br&gt;
If you want to use this api in your website. Just go to the your interface code and create src&amp;gt;api&amp;gt;apiURL.js&lt;br&gt;
and then, create a class like this...&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;class url{&lt;br&gt;
      static baseURL = "your base url",&lt;br&gt;
      static visitorData = this.baseURL + "your visitor route"&lt;br&gt;
}&lt;br&gt;
export default url;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now, go to your Homepage and write a function like&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;GetVisitorDetails=()=&amp;gt;{&lt;br&gt;
      axios.get(url.visitorData).then().catch();&lt;br&gt;
}&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;and now call this function anywhere from the homepage.&lt;/p&gt;

&lt;p&gt;that's it. &lt;/p&gt;

&lt;p&gt;thank you&lt;/p&gt;

&lt;p&gt;if you find any error please comment below in this post, I will try my best to fix it&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to run typescript with vs code</title>
      <dc:creator>S. M. Ahad Ali Chowdhury</dc:creator>
      <pubDate>Wed, 01 Jun 2022 15:04:42 +0000</pubDate>
      <link>https://dev.to/ahadalichowdhury/how-to-run-typescript-with-vs-code-1hpg</link>
      <guid>https://dev.to/ahadalichowdhury/how-to-run-typescript-with-vs-code-1hpg</guid>
      <description>&lt;p&gt;&lt;strong&gt;Task 01: &lt;/strong&gt;&lt;br&gt;
If you have not install &lt;strong&gt;node js&lt;/strong&gt; . go to &lt;strong&gt;node js official website&lt;/strong&gt; and download the latest version.&lt;br&gt;
when download and install is completed , go to the terminal and write &lt;strong&gt;node - version&lt;/strong&gt; and press Enter for sure you really download and install node js.&lt;br&gt;
if node js perfectly installed , it shows a node js version which is already install in your computer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;task -02:&lt;/strong&gt;&lt;br&gt;
go to your terminal and write&lt;br&gt;
 &lt;strong&gt;&lt;em&gt;npm install -g typescript&lt;/em&gt;&lt;/strong&gt; and press enter.&lt;br&gt;
for check the version of typescript, go to terminal and write &lt;strong&gt;tsc --version&lt;/strong&gt; , you can find the version name which you install typescript just few second ago.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;task -03:&lt;/strong&gt;&lt;br&gt;
create a &lt;strong&gt;filename.ts&lt;/strong&gt; in your familiar location, and open vscode in this file location.&lt;br&gt;
write something in your filename.ts&lt;br&gt;
when it is finished, go to vs code terminal and type &lt;strong&gt;tsc filename.ts&lt;/strong&gt;&lt;br&gt;
when you press enter , this show nothing and also see a new file that's name is &lt;strong&gt;filename.js&lt;/strong&gt;&lt;br&gt;
 &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;(In this moment if you face an error like "&lt;strong&gt;&lt;em&gt;tsc.ps1 cannot be loaded because running scripts is disabled on this system&lt;/em&gt;&lt;/strong&gt;"&lt;br&gt;
don't worry…..&lt;br&gt;
go to the &lt;strong&gt;powershall&lt;/strong&gt; and &lt;strong&gt;run this is as an administrator **and type "&lt;/strong&gt;&lt;em&gt;Set-ExecutionPolicy -ExecutionPolicy RemoteSigned&lt;/em&gt;**" and press enter , the terminal want to permission so type "Y" and press enter )&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;and now you go to the vscode terminal again and type &lt;strong&gt;node filename.js&lt;/strong&gt; and press enter &lt;/p&gt;

&lt;p&gt;&lt;strong&gt; boom…………….&lt;br&gt;
it's working hahaha&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>runtypescript</category>
      <category>node</category>
      <category>javascript</category>
    </item>
    <item>
      <title>nodemon install and work with backend(express and mongo)</title>
      <dc:creator>S. M. Ahad Ali Chowdhury</dc:creator>
      <pubDate>Mon, 25 Apr 2022 19:23:28 +0000</pubDate>
      <link>https://dev.to/ahadalichowdhury/nodemon-install-and-work-with-backendexpress-and-mongo-4bkl</link>
      <guid>https://dev.to/ahadalichowdhury/nodemon-install-and-work-with-backendexpress-and-mongo-4bkl</guid>
      <description>&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;First download the nodemon package &lt;br&gt;
      &lt;strong&gt;for globally&lt;br&gt;
          npm i -g nodemon&lt;br&gt;
                    OR&lt;br&gt;
          npm install --global nodemon&lt;/strong&gt;&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  for locally

      npm i nodemon 
               OR
      npm install --save-dev nodemon
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;go to your "&lt;strong&gt;package.json&lt;/strong&gt;" file and go also "scripts" object and write &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;"scripts": {&lt;br&gt;
"start": "nodemon (your main js file, where you do main work like server connect =&amp;gt; for example , app.js)"&lt;br&gt;
},&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;that's it&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Now you can try your terminal &lt;strong&gt;&lt;em&gt;npm start&lt;/em&gt;&lt;/strong&gt; for starting this app&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;good day&lt;/p&gt;

</description>
      <category>nodemon</category>
      <category>npm</category>
      <category>package</category>
      <category>node</category>
    </item>
    <item>
      <title>testing node js api using mocha and chai</title>
      <dc:creator>S. M. Ahad Ali Chowdhury</dc:creator>
      <pubDate>Sun, 24 Apr 2022 08:13:34 +0000</pubDate>
      <link>https://dev.to/ahadalichowdhury/testing-node-js-api-using-mocha-and-chai-593</link>
      <guid>https://dev.to/ahadalichowdhury/testing-node-js-api-using-mocha-and-chai-593</guid>
      <description>&lt;p&gt;testing node js api using chai and mocha&lt;/p&gt;

&lt;p&gt;first following the step for installing mocha and chai &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;npm install mocha --save-dev&lt;/li&gt;
&lt;li&gt;npm install chai --save-dev&lt;/li&gt;
&lt;li&gt;npm install chai-http --save-dev&lt;/li&gt;
&lt;li&gt;go to the package.json file and write in scripts  "test": "mocha"&lt;/li&gt;
&lt;li&gt;then create a folder and create a file (like api.js) and code your testing&lt;/li&gt;
&lt;li&gt;Write npm test in terminal for testing the test&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;for better understanding you can try below link for understanding how mocha and chai work and how we write testing code for test our application------&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.digitalocean.com/community/tutorials/test-a-node-restful-api-with-mocha-and-chai"&gt;https://www.digitalocean.com/community/tutorials/test-a-node-restful-api-with-mocha-and-chai&lt;/a&gt;&lt;/p&gt;

</description>
      <category>node</category>
      <category>mocha</category>
      <category>chai</category>
      <category>testing</category>
    </item>
  </channel>
</rss>
