<?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 ONUIGBO CHUKWUEMELIE on Medium]]></title>
        <description><![CDATA[Stories by ONUIGBO CHUKWUEMELIE on Medium]]></description>
        <link>https://medium.com/@chuksonu700?source=rss-a01a1e002db7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*NfRa_p6LlkVITrpI</url>
            <title>Stories by ONUIGBO CHUKWUEMELIE on Medium</title>
            <link>https://medium.com/@chuksonu700?source=rss-a01a1e002db7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 22:10:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@chuksonu700/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[How Hackers Send Malicious Emails and What you Need to Defend Yourself against Such Attacks.]]></title>
            <link>https://medium.com/@chuksonu700/how-hackers-send-malicious-emails-and-what-you-need-to-defend-yourself-against-such-attacks-eef20a011bff?source=rss-a01a1e002db7------2</link>
            <guid isPermaLink="false">https://medium.com/p/eef20a011bff</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[phishing]]></category>
            <category><![CDATA[kali-linux]]></category>
            <category><![CDATA[social-engineering]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[ONUIGBO CHUKWUEMELIE]]></dc:creator>
            <pubDate>Fri, 14 Mar 2025 13:22:04 GMT</pubDate>
            <atom:updated>2025-03-14T13:22:04.786Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Malicious Emails Images Png" src="https://cdn-images-1.medium.com/max/650/1*gmWqI7leEWZ9fyruLtFoNQ.jpeg" /></figure><p><strong>Malicious Emails<br></strong>Malicious (Phishing) emails deceive individuals and organizations into revealing sensitive information, leading to severe consequences. For individuals, this can result in financial losses and identity theft, while organizations face data breaches and reputational damage. These attacks often exploit human error, making them highly effective for cybercriminals. The evolution of phishing includes increasingly sophisticated tactics amplified by AI, making detection more challenging. Ultimately, phishing attacks disrupt operations, erode trust, and can cause significant emotional distress to victims.</p><p><strong>How Hackers Send Out Phishing Emails<br></strong>This article seeks to show us how Hackers Disguise their email address by making it look like it&#39;s from a legitimate source. For this Tutorial, we need.<br>1. Kali Linux<br>2. Gmail account of Sender with App Password Set. use<strong> </strong><a href="https://medium.com/@chuksonu700/creating-google-gmail-special-app-password-c8bef4cda6e1"><strong>this link</strong> </a>to see how to get it done</p><p>I have Kali Linux as a virtual machine on my Windows 11 PC, as seen below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SRJ6UZNEruDkSj_F1JDN8g.png" /></figure><p><strong>Step 1 <br></strong>Log in as a root user by opening terminals and entering the code below, after that you enter your Kali Linux password</p><pre>sudo -i</pre><p><strong>Step 2:</strong> Enter the below code you will get something similar the image below</p><pre>setoolkit</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*vyxCr_AVez3a_ktQBc_Nzw.png" /></figure><p>S<strong>tep 3</strong>: select the first option by entering “1” then hitting the enter button; you should get the screen below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*YEPIqJqsPbGFhr3IBRra2Q.png" /></figure><p><strong>Step 4:</strong> select the fifth option by entering “5” then hitting the enter button; you should get the screen below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*LdqTmC9IYRrCz2hMcCit-A.png" /></figure><p><strong>Step 5:</strong> select the first option by entering “1” then hitting the enter button; you should get the screen below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/475/1*iytqmEt-NB3j217qhtAONQ.png" /></figure><p><strong>Step 6:</strong> select the first option by entering “1” then hitting the enter button; you should get the screen below. I am using a predefined template now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/406/1*tfpzd02XCRhJ3pYN-lHbDQ.png" /></figure><p><strong>Step 7:</strong> let’s use the Order Confirmation template, select the sixth option by entering “6” then hitting the enter button; you should see a prompt requiring you to enter the receiver email, which you should type in and hit the enter button to get the screen below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/455/1*AgvSD3XWhP0WucsN-GDX_Q.png" /></figure><p><strong>Step 8:</strong> select the first option by entering “1” then hitting the enter button;<br>You will get a prompt to enter ‘Your Gmail email address’: <br>Another prompt for ‘The FROM NAME the user will see’: am setting it to SELLZONE MARCH<br>Another Prompt for ‘Email password’: Enter the App Password you created<br>Another Prompt for ‘Flag this message/s as high priority? [yes|no]’: set Yes<br>Another Prompt for ‘Do you want to attach a file — [y/n]’: Set No<br>Another Prompt for ‘Do you want to attach an inline file — [y/n]’: Set No<br>and that&#39;s all the malicious email will be sent like it from Amazon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/563/1*rz8ZFwvl_otfjJOV22o_pA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*ST9vIc3l4mx2hNdwvEHwdQ.jpeg" /></figure><p>if we had Just sent this Email without Using Social Engineering Toolkit below I how it would have appeared.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*vhzPuKsaFcW7Kzb58NDGDA.jpeg" /></figure><p>So we can see that with these tools we can easily disguise our sender details and make it look like it&#39;s from a legitimate Company. I&#39;m sorry this is already too long in part 2, I am showing practical steps to defend yourself against these attacks.</p><p>Thanks and hope this article was of help to you, reach me via <a href="https://x.com/Chuks_secured">X (twitter)</a>, <a href="https://www.linkedin.com/in/onuigbo-chukwuemelie-913596185/">LinkedIN</a> or send a mail to chukssecured@gmail.com.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eef20a011bff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating Google (Gmail) Special App Password]]></title>
            <link>https://medium.com/@chuksonu700/creating-google-gmail-special-app-password-c8bef4cda6e1?source=rss-a01a1e002db7------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8bef4cda6e1</guid>
            <category><![CDATA[kali-linux]]></category>
            <category><![CDATA[passwords]]></category>
            <category><![CDATA[gmail-app-password]]></category>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[gmail-account]]></category>
            <dc:creator><![CDATA[ONUIGBO CHUKWUEMELIE]]></dc:creator>
            <pubDate>Fri, 14 Mar 2025 11:58:35 GMT</pubDate>
            <atom:updated>2025-03-14T13:20:53.783Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>What is App Password</strong><br>An app password is a 16-digit passcode that gives a less secure app or device permission to access your Google Account. App passwords can only be used with accounts that have <a href="https://support.google.com/accounts/answer/185839">2-Step Verification</a> turned on.</p><p><strong>Step 1:</strong> If you have 2 Step Verication turned On skip to <strong>Step 2; </strong>else<strong> </strong>Click this Link <a href="https://myaccount.google.com/security?rapt=AEjHL4P0UfuLw9vKPAqQcQ-pSgstMHurkMSkyBgXAjb5VBXnUPxuu0Mbhfsng_U9HZ9NRYfGMXJtLAVBbMVOGBbNK-8W6e2s0mqTNkK_duS4Ck1o9vrGjdA">https://myaccount.google.com/security</a> to Setup Google <a href="https://support.google.com/accounts/answer/185839">2-Step Verification</a>. then click on 2-step Verification, add your Phone number and follow through to set it up.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Plia9BUFqlcws4vQ1Bmdgg.png" /></figure><p><strong>Step 2: </strong>Click this Link <a href="https://myaccount.google.com/u/5/apppasswords">https://myaccount.google.com/apppasswords</a>, you might need to verify your password, then it will take you to a page where you can create a special password for your Kali Terminal. Fill in the App name and click create.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1SlqN_SWrlbm8I3QX9SV_Q.png" /></figure><p>Now you have successfully created your Special App password, copy it and save it somewhere safe, I advise you to delete it without saving it because it can <strong>Fully Access</strong> your google account.</p><p>Thanks and hope this article was of help to you, reach me via <a href="https://x.com/Chuks_secured">X (twitter)</a>, <a href="https://www.linkedin.com/in/onuigbo-chukwuemelie-913596185/">LinkedIN</a> or send a mail to chukssecured@gmail.com.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8bef4cda6e1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Artificial Intelligence Image Generation With Node.js Part 2]]></title>
            <link>https://medium.com/@chuksonu700/artificial-intelligence-image-generation-with-node-js-part-2-f239549e5711?source=rss-a01a1e002db7------2</link>
            <guid isPermaLink="false">https://medium.com/p/f239549e5711</guid>
            <dc:creator><![CDATA[ONUIGBO CHUKWUEMELIE]]></dc:creator>
            <pubDate>Thu, 02 Feb 2023 12:28:48 GMT</pubDate>
            <atom:updated>2023-02-02T12:34:47.050Z</atom:updated>
            <content:encoded><![CDATA[<p>In <a href="https://medium.com/@chuksonu700/artificial-intelligence-image-generation-with-node-js-part-1-a98122581e4d">Part 1</a> we built the server. Now, we will use Html and JavaScript to display the images we generated in our backend server.</p><p><strong>Step 1: </strong>Updated folder structure</p><p>Create a new directory called public and create an index.html file then create three subdirectories css, img and js our new project structure should be like the below image.</p><figure><img alt="folder Structure artificial intelligence image generation" src="https://cdn-images-1.medium.com/max/1024/1*WQpHYKd_puBcq2Wsvk22rw.png" /></figure><p><strong>Step 2</strong>: Html Add the following lines of code to the index.html file</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br><br>&lt;head&gt;<br>  &lt;meta charset=&quot;UTF-8&quot; /&gt;<br>  &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot; /&gt;<br>  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot; /&gt;<br>  &lt;!-- Bootstrap Cds --&gt;<br>  &lt;link href=&quot;https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css&quot; rel=&quot;stylesheet&quot;<br>    integrity=&quot;sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC&quot; crossorigin=&quot;anonymous&quot;&gt;<br>  &lt;link rel=&quot;stylesheet&quot; href=&quot;css/style.css&quot; /&gt;<br>  &lt;link rel=&quot;stylesheet&quot; href=&quot;css/spinner.css&quot; /&gt;<br><br>  <br>  &lt;title&gt;OpenAI Image Genarator&lt;/title&gt;<br>&lt;/head&gt;<br><br>&lt;body &gt;<br><br>  &lt;header&gt;<br>    &lt;nav class=&quot;navbar navbar-light bg-light&quot;&gt;<br>      &lt;div class=&quot;container&quot;&gt;<br>        &lt;a class=&quot;navbar-brand&quot; href=&quot;/&quot;&gt;<br>          &lt;svg data-name=&quot;OpenAI Logo&quot; width=&quot;24px&quot; height=&quot;24px&quot; viewBox=&quot;140 140 520 520&quot;&gt;<br>            &lt;defs&gt;<br>              &lt;linearGradient id=&quot;linear&quot; x1=&quot;100%&quot; y1=&quot;22%&quot; x2=&quot;0%&quot; y2=&quot;78%&quot;&gt;<br>                &lt;stop offset=&quot;0%&quot; stop-color=&quot;rgb(131,211,231)&quot;&gt;&lt;/stop&gt;<br>                &lt;stop offset=&quot;2%&quot; stop-color=&quot;rgb(127,203,229)&quot;&gt;&lt;/stop&gt;<br>                &lt;stop offset=&quot;25%&quot; stop-color=&quot;rgb(86,115,217)&quot;&gt;&lt;/stop&gt;<br>                &lt;stop offset=&quot;49%&quot; stop-color=&quot;rgb(105,80,190)&quot;&gt;&lt;/stop&gt;<br>                &lt;stop offset=&quot;98%&quot; stop-color=&quot;rgb(197,59,119)&quot;&gt;&lt;/stop&gt;<br>                &lt;stop offset=&quot;100%&quot; stop-color=&quot;rgb(197,59,119)&quot;&gt;&lt;/stop&gt;<br>              &lt;/linearGradient&gt;<br>            &lt;/defs&gt;<br>            &lt;path id=&quot;logo&quot;<br>              d=&quot;m617.24 354a126.36 126.36 0 0 0 -10.86-103.79 127.8 127.8 0 0 0 -137.65-61.32 126.36 126.36 0 0 0 -95.31-42.49 127.81 127.81 0 0 0 -121.92 88.49 126.4 126.4 0 0 0 -84.5 61.3 127.82 127.82 0 0 0 15.72 149.86 126.36 126.36 0 0 0 10.86 103.79 127.81 127.81 0 0 0 137.65 61.32 126.36 126.36 0 0 0 95.31 42.49 127.81 127.81 0 0 0 121.96-88.54 126.4 126.4 0 0 0 84.5-61.3 127.82 127.82 0 0 0 -15.76-149.81zm-190.66 266.49a94.79 94.79 0 0 1 -60.85-22c.77-.42 2.12-1.16 3-1.7l101-58.34a16.42 16.42 0 0 0 8.3-14.37v-142.39l42.69 24.65a1.52 1.52 0 0 1 .83 1.17v117.92a95.18 95.18 0 0 1 -94.97 95.06zm-204.24-87.23a94.74 94.74 0 0 1 -11.34-63.7c.75.45 2.06 1.25 3 1.79l101 58.34a16.44 16.44 0 0 0 16.59 0l123.31-71.2v49.3a1.53 1.53 0 0 1 -.61 1.31l-102.1 58.95a95.16 95.16 0 0 1 -129.85-34.79zm-26.57-220.49a94.71 94.71 0 0 1 49.48-41.68c0 .87-.05 2.41-.05 3.48v116.68a16.41 16.41 0 0 0 8.29 14.36l123.31 71.19-42.69 24.65a1.53 1.53 0 0 1 -1.44.13l-102.11-59a95.16 95.16 0 0 1 -34.79-129.81zm350.74 81.62-123.31-71.2 42.69-24.64a1.53 1.53 0 0 1 1.44-.13l102.11 58.95a95.08 95.08 0 0 1 -14.69 171.55c0-.88 0-2.42 0-3.49v-116.68a16.4 16.4 0 0 0 -8.24-14.36zm42.49-63.95c-.75-.46-2.06-1.25-3-1.79l-101-58.34a16.46 16.46 0 0 0 -16.59 0l-123.31 71.2v-49.3a1.53 1.53 0 0 1 .61-1.31l102.1-58.9a95.07 95.07 0 0 1 141.19 98.44zm-267.11 87.87-42.7-24.65a1.52 1.52 0 0 1 -.83-1.17v-117.92a95.07 95.07 0 0 1 155.9-73c-.77.42-2.11 1.16-3 1.7l-101 58.34a16.41 16.41 0 0 0 -8.3 14.36zm23.19-50 54.92-31.72 54.92 31.7v63.42l-54.92 31.7-54.92-31.7z&quot;<br>              fill=&quot;#202123&quot;&gt;&lt;/path&gt;<br>          &lt;/svg&gt; &amp;nbsp;&amp;nbsp;Open Image Generator<br>        &lt;/a&gt;<br>      &lt;/div&gt;<br>    &lt;/nav&gt;<br>  &lt;/header&gt;<br><br>  &lt;main&gt;<br>    &lt;section class=&quot;showcase p-4&quot;&gt;<br>      <br>      &lt;div class=&quot;alert alert-primary alert-dismissible fade&quot; id=&quot;#alertBar&quot;&gt;<br>        &lt;strong id=&quot;alertss&quot;&gt; &lt;/strong&gt;<br>        &lt;button type=&quot;button&quot; class=&quot;btn-close&quot; onclick=&quot;removeNow()&quot;&gt;&lt;/button&gt;<br>      &lt;/div&gt;<br>      &lt;form id=&quot;image-form&quot;&gt;<br>        &lt;h1 class=&quot;text-primary &quot;&gt;Describe An Image&lt;/h1&gt;<br>        &lt;div class=&quot;row&quot;&gt;<br>          &lt;div class=&quot;col-12&quot;&gt;<br>            &lt;input type=&quot;text&quot; id=&quot;prompt&quot; class=&quot;form-control&quot; placeholder=&quot;Describe Image&quot; /&gt;<br>          &lt;/div&gt;<br>        &lt;/div&gt;<br>        &lt;div class=&quot;row gy-1 gx-1 justify-content-around&quot;&gt;<br>          &lt;!-- size --&gt;<br>          &lt;div class=&quot;col-auto&quot;&gt;<br>              &lt;select class=&quot;form-select form-select-lg&quot; name=&quot;size&quot; id=&quot;size&quot;&gt;<br>                &lt;option value= &quot;medium&quot; selected&gt;Please Select Size&lt;/option&gt;<br>                &lt;option value=&quot;small&quot;&gt;Small&lt;/option&gt;<br>                &lt;option value=&quot;medium&quot; &gt;Medium&lt;/option&gt;<br>                &lt;option value=&quot;large&quot;&gt;Large&lt;/option&gt;<br>              &lt;/select&gt;<br>          &lt;/div&gt;<br>            <br>        &lt;!-- Numbers --&gt;<br>        &lt;div class=&quot;col-auto&quot;&gt;<br>            &lt;select class=&quot;form-select form-select-lg&quot; name=&quot;num&quot; id=&quot;num&quot;&gt;<br>              &lt;option value=&quot;3&quot;selected&gt;How Many Images &lt;/option&gt;<br>              &lt;option value=&quot;1&quot;&gt;1&lt;/option&gt;<br>              &lt;option value=&quot;2&quot; &gt;2&lt;/option&gt;<br>              &lt;option value=&quot;3&quot;&gt;3&lt;/option&gt;<br>              <br>            &lt;/select&gt;<br>          &lt;/div&gt;<br>        &lt;/div&gt;<br><br>        <br>        &lt;button type=&quot;submit&quot; class=&quot;btn btn-dark&quot;&gt;Generate&lt;/button&gt;<br>      &lt;/form&gt;<br>    &lt;/section&gt;<br><br>    &lt;section class=&quot;image-holder bg-light&quot;&gt;<br>      &lt;div class=&quot; container &quot;&gt;<br>        &lt;div class=&quot;row image-container text-center&quot;&gt;<br>          <br>        &lt;/div&gt;<br>        &lt;h2 class=&quot;msg&quot;&gt;&lt;/h2&gt;<br>      &lt;/div&gt;<br>    &lt;/section&gt;<br>  &lt;/main&gt;<br><br>  &lt;div class=&quot;spinner&quot;&gt;&lt;/div&gt;<br>  &lt;script src=&quot;https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js&quot;<br>    integrity=&quot;sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM&quot; crossorigin=&quot;anonymous&quot;&gt;<br>  &lt;/script&gt;<br>  &lt;script src=&quot;js/main.js&quot; defer&gt;&lt;/script&gt;<br>&lt;/body&gt;<br><br>&lt;/html&gt;</pre><p>In the above code we first imported Bootstrap using CDNs then we imported our custom css files and then added our title using the below lines.</p><pre>&lt;!-- Bootstrap Cds --&gt;<br>  &lt;link href=&quot;https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css&quot; rel=&quot;stylesheet&quot;<br>    integrity=&quot;sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC&quot; crossorigin=&quot;anonymous&quot;&gt;<br>  &lt;link rel=&quot;stylesheet&quot; href=&quot;css/style.css&quot; /&gt;<br>  &lt;link rel=&quot;stylesheet&quot; href=&quot;css/spinner.css&quot; /&gt;<br><br>  <br>  &lt;title&gt;OpenAI Image Genarator&lt;/title&gt;</pre><p>Secondly, we added the header using the header tag and svg to generate the Logo.</p><pre>&lt;header&gt;<br>    &lt;nav class=&quot;navbar navbar-light bg-light&quot;&gt;<br>      &lt;div class=&quot;container&quot;&gt;<br>        &lt;a class=&quot;navbar-brand&quot; href=&quot;/&quot;&gt;<br>          &lt;svg data-name=&quot;OpenAI Logo&quot; width=&quot;24px&quot; height=&quot;24px&quot; viewBox=&quot;140 140 520 520&quot;&gt;<br>            &lt;defs&gt;<br>              &lt;linearGradient id=&quot;linear&quot; x1=&quot;100%&quot; y1=&quot;22%&quot; x2=&quot;0%&quot; y2=&quot;78%&quot;&gt;<br>                &lt;stop offset=&quot;0%&quot; stop-color=&quot;rgb(131,211,231)&quot;&gt;&lt;/stop&gt;<br>                &lt;stop offset=&quot;2%&quot; stop-color=&quot;rgb(127,203,229)&quot;&gt;&lt;/stop&gt;<br>                &lt;stop offset=&quot;25%&quot; stop-color=&quot;rgb(86,115,217)&quot;&gt;&lt;/stop&gt;<br>                &lt;stop offset=&quot;49%&quot; stop-color=&quot;rgb(105,80,190)&quot;&gt;&lt;/stop&gt;<br>                &lt;stop offset=&quot;98%&quot; stop-color=&quot;rgb(197,59,119)&quot;&gt;&lt;/stop&gt;<br>                &lt;stop offset=&quot;100%&quot; stop-color=&quot;rgb(197,59,119)&quot;&gt;&lt;/stop&gt;<br>              &lt;/linearGradient&gt;<br>            &lt;/defs&gt;<br>            &lt;path id=&quot;logo&quot;<br>              d=&quot;m617.24 354a126.36 126.36 0 0 0 -10.86-103.79 127.8 127.8 0 0 0 -137.65-61.32 126.36 126.36 0 0 0 -95.31-42.49 127.81 127.81 0 0 0 -121.92 88.49 126.4 126.4 0 0 0 -84.5 61.3 127.82 127.82 0 0 0 15.72 149.86 126.36 126.36 0 0 0 10.86 103.79 127.81 127.81 0 0 0 137.65 61.32 126.36 126.36 0 0 0 95.31 42.49 127.81 127.81 0 0 0 121.96-88.54 126.4 126.4 0 0 0 84.5-61.3 127.82 127.82 0 0 0 -15.76-149.81zm-190.66 266.49a94.79 94.79 0 0 1 -60.85-22c.77-.42 2.12-1.16 3-1.7l101-58.34a16.42 16.42 0 0 0 8.3-14.37v-142.39l42.69 24.65a1.52 1.52 0 0 1 .83 1.17v117.92a95.18 95.18 0 0 1 -94.97 95.06zm-204.24-87.23a94.74 94.74 0 0 1 -11.34-63.7c.75.45 2.06 1.25 3 1.79l101 58.34a16.44 16.44 0 0 0 16.59 0l123.31-71.2v49.3a1.53 1.53 0 0 1 -.61 1.31l-102.1 58.95a95.16 95.16 0 0 1 -129.85-34.79zm-26.57-220.49a94.71 94.71 0 0 1 49.48-41.68c0 .87-.05 2.41-.05 3.48v116.68a16.41 16.41 0 0 0 8.29 14.36l123.31 71.19-42.69 24.65a1.53 1.53 0 0 1 -1.44.13l-102.11-59a95.16 95.16 0 0 1 -34.79-129.81zm350.74 81.62-123.31-71.2 42.69-24.64a1.53 1.53 0 0 1 1.44-.13l102.11 58.95a95.08 95.08 0 0 1 -14.69 171.55c0-.88 0-2.42 0-3.49v-116.68a16.4 16.4 0 0 0 -8.24-14.36zm42.49-63.95c-.75-.46-2.06-1.25-3-1.79l-101-58.34a16.46 16.46 0 0 0 -16.59 0l-123.31 71.2v-49.3a1.53 1.53 0 0 1 .61-1.31l102.1-58.9a95.07 95.07 0 0 1 141.19 98.44zm-267.11 87.87-42.7-24.65a1.52 1.52 0 0 1 -.83-1.17v-117.92a95.07 95.07 0 0 1 155.9-73c-.77.42-2.11 1.16-3 1.7l-101 58.34a16.41 16.41 0 0 0 -8.3 14.36zm23.19-50 54.92-31.72 54.92 31.7v63.42l-54.92 31.7-54.92-31.7z&quot;<br>              fill=&quot;#202123&quot;&gt;&lt;/path&gt;<br>          &lt;/svg&gt; &amp;nbsp;&amp;nbsp;Open Image Generator<br>        &lt;/a&gt;<br>      &lt;/div&gt;<br>    &lt;/nav&gt;<br>  &lt;/header&gt;</pre><p>Then we added a simple html form for sending our user image generation request to the server.</p><pre> &lt;form id=&quot;image-form&quot;&gt;<br>        &lt;h1 class=&quot;text-primary &quot;&gt;Describe An Image&lt;/h1&gt;<br>        &lt;div class=&quot;row&quot;&gt;<br>          &lt;div class=&quot;col-12&quot;&gt;<br>            &lt;input type=&quot;text&quot; id=&quot;prompt&quot; class=&quot;form-control&quot; placeholder=&quot;Describe Image&quot; /&gt;<br>          &lt;/div&gt;<br>        &lt;/div&gt;<br>        &lt;div class=&quot;row gy-1 gx-1 justify-content-around&quot;&gt;<br>          &lt;!-- size --&gt;<br>          &lt;div class=&quot;col-auto&quot;&gt;<br>              &lt;select class=&quot;form-select form-select-lg&quot; name=&quot;size&quot; id=&quot;size&quot;&gt;<br>                &lt;option value= &quot;medium&quot; selected&gt;Please Select Size&lt;/option&gt;<br>                &lt;option value=&quot;small&quot;&gt;Small&lt;/option&gt;<br>                &lt;option value=&quot;medium&quot; &gt;Medium&lt;/option&gt;<br>                &lt;option value=&quot;large&quot;&gt;Large&lt;/option&gt;<br>              &lt;/select&gt;<br>          &lt;/div&gt;<br>            <br>        &lt;!-- Numbers --&gt;<br>        &lt;div class=&quot;col-auto&quot;&gt;<br>            &lt;select class=&quot;form-select form-select-lg&quot; name=&quot;num&quot; id=&quot;num&quot;&gt;<br>              &lt;option value=&quot;3&quot;selected&gt;How Many Images &lt;/option&gt;<br>              &lt;option value=&quot;1&quot;&gt;1&lt;/option&gt;<br>              &lt;option value=&quot;2&quot; &gt;2&lt;/option&gt;<br>              &lt;option value=&quot;3&quot;&gt;3&lt;/option&gt;<br>              <br>            &lt;/select&gt;<br>          &lt;/div&gt;<br>        &lt;/div&gt;<br><br>        <br>        &lt;button type=&quot;submit&quot; class=&quot;btn btn-dark&quot;&gt;Generate&lt;/button&gt;<br>      &lt;/form&gt;</pre><p>Finally, we added a section for displaying Generated images that we generated and closed it by importing bootstrap bundle CDN and also our custom JavaScript file.</p><p><strong>Step 3:</strong> Styling with CSS. create two files style.css and spinner.css inside the css sub-directory of public. Then add the following lines to your style.css file</p><pre>@import url(https://medium.com/&#39;https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;700&amp;display=swap&#39;);<br><br>*,<br>*:before,<br>*:after {<br>  box-sizing: border-box;<br>  margin: 0;<br>  padding: 0;<br>}<br><br>:root {<br>  --primary-color: #627d92;<br>}<br><br><br><br>.navbar {<br>  margin-bottom: 20px;<br>}<br><br>main {<br>  height: 100vh;<br>  <br>}<br>/* Showcase */<br>.showcase {<br>  height: max-content;<br>  padding: auto;<br>  width: 100%;<br>  margin-top: -20px;<br>  background: url(https://medium.com/&#39;../img/bg.jpg&#39;);<br>  background-position: center;<br>  background-repeat: no-repeat;<br>  background-size: cover;<br>}<br><br>.showcase h1 {<br>  font-size: 2.5rem;<br>  color: rgb(51, 51, 51);<br>  text-align: center;<br>  padding: 1rem 0;<br>}<br><br>.showcase form {<br>  display: flex;<br>  align-items: center;<br>  justify-content: center;<br>  flex-direction: column;<br>  height: 100%;<br>  width: 100%;<br>}<br><br>.showcase form input,<br>form select {<br>  font-size: 20px;<br>  padding: 1rem;<br>  border: 1px solid #ccc;<br>  border-radius: 5px;<br>  margin-bottom: 1rem;<br>  width: max-content;<br>}<br><br><br>/* Image */<br>.image-holder{<br>  height: max-content;<br>}<br>.image {<br>  width: 100%;<br>  margin-top: 2rem;<br>}<br><br>img {<br>  border-radius: 10%;<br>}<br><br>.msg {<br>  font-size: 1.6rem;<br>  text-align: center;<br>  margin-top: 1rem;<br>}</pre><p>Then add the following lines into the spinner.css file</p><pre>/* Spinner From: https://codepen.io/tbrownvisuals/pen/edGYvx */<br>.spinner {<br>  position: fixed;<br>  z-index: 999;<br>  height: 2em;<br>  width: 2em;<br>  overflow: show;<br>  margin: auto;<br>  top: 0;<br>  left: 0;<br>  bottom: 0;<br>  right: 0;<br>  display: none;<br>}<br><br>.show {<br>  display: block;<br>}<br><br>/* Transparent Overlay */<br>.spinner:before {<br>  content: &#39;&#39;;<br>  display: block;<br>  position: fixed;<br>  top: 0;<br>  left: 0;<br>  width: 100%;<br>  height: 100%;<br>  background: radial-gradient(rgba(20, 20, 20, 0.8), rgba(0, 0, 0, 0.8));<br><br>  background: -webkit-radial-gradient(<br>    rgba(20, 20, 20, 0.8),<br>    rgba(0, 0, 0, 0.8)<br>  );<br>}<br><br>/* :not(:required) hides these rules from IE9 and below */<br>.spinner:not(:required) {<br>  /* hide &quot;loading...&quot; text */<br>  font: 0/0 a;<br>  color: transparent;<br>  text-shadow: none;<br>  background-color: transparent;<br>  border: 0;<br>}<br><br>.spinner:not(:required):after {<br>  content: &#39;&#39;;<br>  display: block;<br>  font-size: 10px;<br>  width: 1em;<br>  height: 1em;<br>  margin-top: -0.5em;<br>  -webkit-animation: spinner 150ms infinite linear;<br>  -moz-animation: spinner 150ms infinite linear;<br>  -ms-animation: spinner 150ms infinite linear;<br>  -o-animation: spinner 150ms infinite linear;<br>  animation: spinner 150ms infinite linear;<br>  border-radius: 0.5em;<br>  -webkit-box-shadow: rgba(255, 255, 255, 0.75) 1.5em 0 0 0,<br>    rgba(255, 255, 255, 0.75) 1.1em 1.1em 0 0,<br>    rgba(255, 255, 255, 0.75) 0 1.5em 0 0,<br>    rgba(255, 255, 255, 0.75) -1.1em 1.1em 0 0,<br>    rgba(255, 255, 255, 0.75) -1.5em 0 0 0,<br>    rgba(255, 255, 255, 0.75) -1.1em -1.1em 0 0,<br>    rgba(255, 255, 255, 0.75) 0 -1.5em 0 0,<br>    rgba(255, 255, 255, 0.75) 1.1em -1.1em 0 0;<br>  box-shadow: rgba(255, 255, 255, 0.75) 1.5em 0 0 0,<br>    rgba(255, 255, 255, 0.75) 1.1em 1.1em 0 0,<br>    rgba(255, 255, 255, 0.75) 0 1.5em 0 0,<br>    rgba(255, 255, 255, 0.75) -1.1em 1.1em 0 0,<br>    rgba(255, 255, 255, 0.75) -1.5em 0 0 0,<br>    rgba(255, 255, 255, 0.75) -1.1em -1.1em 0 0,<br>    rgba(255, 255, 255, 0.75) 0 -1.5em 0 0,<br>    rgba(255, 255, 255, 0.75) 1.1em -1.1em 0 0;<br>}<br><br>/* Animation */<br><br>@-webkit-keyframes spinner {<br>  0% {<br>    -webkit-transform: rotate(0deg);<br>    -moz-transform: rotate(0deg);<br>    -ms-transform: rotate(0deg);<br>    -o-transform: rotate(0deg);<br>    transform: rotate(0deg);<br>  }<br>  100% {<br>    -webkit-transform: rotate(360deg);<br>    -moz-transform: rotate(360deg);<br>    -ms-transform: rotate(360deg);<br>    -o-transform: rotate(360deg);<br>    transform: rotate(360deg);<br>  }<br>}<br>@-moz-keyframes spinner {<br>  0% {<br>    -webkit-transform: rotate(0deg);<br>    -moz-transform: rotate(0deg);<br>    -ms-transform: rotate(0deg);<br>    -o-transform: rotate(0deg);<br>    transform: rotate(0deg);<br>  }<br>  100% {<br>    -webkit-transform: rotate(360deg);<br>    -moz-transform: rotate(360deg);<br>    -ms-transform: rotate(360deg);<br>    -o-transform: rotate(360deg);<br>    transform: rotate(360deg);<br>  }<br>}<br>@-o-keyframes spinner {<br>  0% {<br>    -webkit-transform: rotate(0deg);<br>    -moz-transform: rotate(0deg);<br>    -ms-transform: rotate(0deg);<br>    -o-transform: rotate(0deg);<br>    transform: rotate(0deg);<br>  }<br>  100% {<br>    -webkit-transform: rotate(360deg);<br>    -moz-transform: rotate(360deg);<br>    -ms-transform: rotate(360deg);<br>    -o-transform: rotate(360deg);<br>    transform: rotate(360deg);<br>  }<br>}<br>@keyframes spinner {<br>  0% {<br>    -webkit-transform: rotate(0deg);<br>    -moz-transform: rotate(0deg);<br>    -ms-transform: rotate(0deg);<br>    -o-transform: rotate(0deg);<br>    transform: rotate(0deg);<br>  }<br>  100% {<br>    -webkit-transform: rotate(360deg);<br>    -moz-transform: rotate(360deg);<br>    -ms-transform: rotate(360deg);<br>    -o-transform: rotate(360deg);<br>    transform: rotate(360deg);<br>  }<br>}</pre><p>You are free to use any image for your background image in the .showcase class. In your browser, you should get the below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2vYgHMXY_SD7Ivr4G0sIBQ.png" /></figure><p>Step 4: Adding Javascript. Create a main.js file inside the js subdirectory of public, then add the following lines to the main.js file.</p><pre>function onSubmit(e) {<br>  e.preventDefault();<br><br>  let prompt = document.querySelector(&#39;#prompt&#39;).value;<br>  prompt = prompt.trim(); //remove whitespace;<br>  const size = document.querySelector(&#39;#size&#39;).value;<br>  const num = document.querySelector(&#39;#num&#39;).value;<br><br>  if (prompt === &#39;&#39;) {<br>    document.querySelector(&#39;#alertss&#39;).innerHTML=`Please add some text`;<br>    var element = document.getElementById(&quot;#alertBar&quot;);<br>    element.classList.toggle(&quot;show&quot;);<br>    return;<br>  }<br>  if (prompt.length&lt;3) {<br>    document.querySelector(&#39;#alertss&#39;).innerHTML=`Please add More text`;<br>    var element = document.getElementById(&quot;#alertBar&quot;);<br>    element.classList.toggle(&quot;show&quot;);<br>    return;<br>  }<br>  document.querySelector(&#39;.image-container&#39;).innerHTML=&quot;&quot;;<br>  generateImageRequest(prompt, size,num);<br>}<br><br>async function generateImageRequest(prompt, size,num) {<br>  try {<br>    showSpinner();<br><br>    const response = await fetch(&#39;/openai/generateimage&#39;, {<br>      method: &#39;POST&#39;,<br>      headers: {<br>        &#39;Content-Type&#39;: &#39;application/json&#39;,<br>      },<br>      body: JSON.stringify({<br>        prompt,<br>        size,<br>        num,<br>      }),<br>    });<br><br><br>    if (!response.ok) {<br>      removeSpinner();<br>      throw new Error(&#39;That image could not be generated&#39;);<br>    }<br><br>    const data = await response.json();<br>    <br>    const imageUrl = data.data;<br>    <br>    imageUrl.data.forEach(data =&gt; {<br>      document.querySelector(&#39;.image-container&#39;).innerHTML += `<br>      &lt;div class=&quot;col-md-4&quot;&gt;<br>         &lt;img src=&quot;${data.url}&quot; alt=&quot;&quot; class=&quot;image p-1&quot; /&gt;<br>      &lt;/div&gt;<br>         `;<br>    });<br><br>    removeSpinner();<br>  } catch (error) {<br>    document.querySelector(&#39;.msg&#39;).textContent = error;<br>  }<br>}<br><br>function showSpinner() {<br>  document.querySelector(&#39;.spinner&#39;).classList.add(&#39;show&#39;);<br>}<br><br>function removeSpinner() {<br>  document.querySelector(&#39;.spinner&#39;).classList.remove(&#39;show&#39;);<br>}<br><br>function removeNow(){<br>  var element = document.getElementById(&quot;#alertBar&quot;);<br>    element.classList.toggle(&quot;show&quot;);<br>}<br>document.querySelector(&#39;#image-form&#39;).addEventListener(&#39;submit&#39;, onSubmit);</pre><p>In the main.js firstly, we make sure the form is filled i.e the images to generate are described and text describing images must be more than 3 characters long. next, we call the generateImageRequest function with our parameters, the generateImageRequest function simply sends a post request to our server, finally, we call some minor functions for showing alerts, displaying the loading spinner and removing the spinner etc.</p><p>We are Done with Building the front now if the user describes an image we get images generated by our server displayed below as seen below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M2llu5xns0pSsbB98MmC0g.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f239549e5711" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Artificial Intelligence Image Generation With Node.js part 1]]></title>
            <link>https://medium.com/@chuksonu700/artificial-intelligence-image-generation-with-node-js-part-1-a98122581e4d?source=rss-a01a1e002db7------2</link>
            <guid isPermaLink="false">https://medium.com/p/a98122581e4d</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[openai]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[html]]></category>
            <dc:creator><![CDATA[ONUIGBO CHUKWUEMELIE]]></dc:creator>
            <pubDate>Mon, 09 Jan 2023 11:42:37 GMT</pubDate>
            <atom:updated>2023-02-02T12:36:26.854Z</atom:updated>
            <content:encoded><![CDATA[<p>Today We talk about using Node.js To Generate Images from Text. in this part 1 we will build the backend of the application. In n <a href="https://medium.com/@chuksonu700/artificial-intelligence-image-generation-with-node-js-part-2-f239549e5711">Part 2</a>, we will use Html and JavaScript to display the images we generated in our backend server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2vYgHMXY_SD7Ivr4G0sIBQ.png" /></figure><p><strong>Requirements</strong></p><p><em>Knowledge</em></p><ol><li>Basic Knowledge Of Node.js and Express</li><li>Basic Knowledge of Html, and JavaScript.</li></ol><p><em>Tools</em></p><ol><li>Nodejs and npm Installed.</li></ol><h3><strong>Dependencies</strong></h3><p>Express: <a href="https://www.npmjs.com/package/express">A simple Node.js Server</a></p><p>openai: AI for Image Generation</p><p>Dotenv: for mangingEnvironment Variable</p><p>If you don&#39;t have Nodejs Installed, you can Download and Install it from <a href="https://nodejs.org/en/download/">Here</a>. It is required. You can use any code editor of your choice I am using <a href="https://code.visualstudio.com/download">Vs code</a></p><h3>Project Setup</h3><p>Create your root Directory. I am using Ai-node, inside the root directory. Create two files index.js and README.md, and create two directories: controllers and route, in the controllers directory create two files live.js and OpenaiController.js, in routes create a file openaiRoutes.js just like below</p><figure><img alt="folder structure" src="https://cdn-images-1.medium.com/max/572/1*2xifImRCwaP5qC7aPT9MPw.png" /><figcaption>folder structure</figcaption></figure><p><strong>README File</strong></p><p>Add The below to your ReadMe File</p><pre># AI Image Generator<br><br>This is a simple image generator built with Node.js and Express that uses [OpenAI&#39;s Dall-E models](https://beta.openai.com/docs/guides/images) to generate images.</pre><p>Add the line node_modules to the .gitignore file if you plan to use a git repository. Generate the package.json file using the following command: npm init -y;</p><pre>npm init -y</pre><p>you should get the following</p><pre>{<br>  &quot;name&quot;: &quot;ai-node&quot;,<br>  &quot;version&quot;: &quot;1.0.0&quot;,<br>  &quot;description&quot;: &quot;This is a simple image generator built with Node.js and Express that uses [OpenAI&#39;s Dall-E models](https://beta.openai.com/docs/guides/images) to generate images.&quot;,<br>  &quot;main&quot;: &quot;index.js&quot;,<br>  &quot;scripts&quot;: {<br>    &quot;test&quot;: &quot;echo \&quot;Error: no test specified\&quot; &amp;&amp; exit 1&quot;<br>  },<br>  &quot;keywords&quot;: [],<br>  &quot;author&quot;: &quot;&quot;,<br>  &quot;license&quot;: &quot;ISC&quot;<br>}</pre><p><strong>Installing Dependencies</strong></p><pre>npm install express openai dotenv</pre><p>after installation, write this code into your index.js</p><pre>const path = require(&#39;path&#39;);<br>const express = require(&#39;express&#39;);<br>const dotenv = require(&#39;dotenv&#39;).config();<br>const port = process.env.PORT || 8000;<br><br>const app = express();<br><br>// Enable body parser<br>app.use(express.json());<br>app.use(express.urlencoded({ extended: false }));<br><br>// Set static folder<br>app.use(express.static(path.join(__dirname, &#39;public&#39;)));<br><br>app.get(&#39;/&#39;,(req,res)=&gt;{<br>    res.send(&quot;Welcome&quot;)<br>})<br><br>const d = new Date()<br>app.listen(port, () =&gt; console.log(`Server started on port ${port} ${d.toISOString()}`));</pre><p>The Above will create a server listening on port 8000, and also configure the environment variables.</p><p>create a file .env and add this file to it</p><pre>OPENAI_API_KEY = &#39;your api key here&#39;</pre><p>API KEYS</p><p>An API key is <strong>a unique identifier used to connect to, or perform, an API call</strong>. API stands for Application programming interface. APIs are used to connect one program to another, to share functionality. I will connect this nodejs server to openai API for generating images.</p><p>Get your Key By <a href="https://beta.openai.com/account/api-keys">Creating an account with OpenApi</a> after creating an account with Open AI Use <a href="https://beta.openai.com/account/api-keys">this link </a>to see your Keys or create one, then replace your api key in the .env file.</p><p>Update the package.js file, and add these lines in the script section, replacing the test script.</p><pre>&quot;start&quot;: &quot;node index&quot;,<br> &quot;dev&quot;: &quot;nodemon index&quot;</pre><p>We use nodemon in deveveloper mode to restart the server automatically when we make an update.</p><blockquote>Open the openaiController.js file and add the following code.</blockquote><pre>// import openAI<br>const { Configuration, OpenAIApi } = require(&#39;openai&#39;);<br><br>//OpenAi Configurations <br>const configuration = new Configuration({<br>  // key from environment variables<br>  apiKey: process.env.OPENAI_API_KEY,<br>});<br>const openai = new OpenAIApi(configuration);<br><br>//function to Generate Image<br>const generateImage = async (req, res) =&gt; {<br>  //Using Es6 destructuring to get Values from req body,<br>  const { prompt, size,num } = req.query;<br><br>  //setting the image Size using Ternary Operator<br>  const imageSize =<br>    size === &#39;small&#39; ? &#39;256x256&#39; : size === &#39;medium&#39; ? &#39;512x512&#39; : &#39;1024x1024&#39;;<br><br>    // creating image from openai API<br>  try {<br>    const response = await openai.createImage({<br>      prompt,<br>      n: parseInt(num) || 3,<br>      size: imageSize,<br>    });<br><br>    const SendBack = response.data;<br>    <br>    //send result okay<br>    res.status(200).json({<br>      success: true,<br>      data: SendBack,<br>    });<br>  } catch (error) {<br>    //errors<br>    if (error.response) {<br>      console.log(error.response.status);<br>      console.log(error.response.data);<br>    } else {<br>      console.log(error.message);<br>    }<br>    <br>    //send result Failed<br>    res.status(400).json({<br>      success: false,<br>      error: &#39;The image could not be generated&#39;,<br>    });<br>  }<br>};<br><br>module.exports = { generateImage };</pre><p>This file is our Openai Controller file, I first Import Openai and configuration from openai, then i configure it using my API Key. We simple send request containing a Prompt which is the User Text, size and Numbers of images which we have 3 as default.</p><p>open openaiRoutes.js and add the following lines to it:</p><pre>// importing express<br>const express = require(&#39;express&#39;);<br>// importing controller<br>const { generateImage } = require(&#39;../controllers/openaiController&#39;);<br>//setting up router<br>const router = express.Router();<br><br>//route for generating Images<br>router.get(&#39;/generateimage&#39;, generateImage);<br><br>module.exports = router;</pre><p>we import express and our openai controller for generating images, then router. I created a generateimage route which is linked to generateimage Controller.</p><p>Finally we link the generateimage route to our server in index.js so we open index.js add this line lines.</p><pre>app.get(&#39;/&#39;,(req,res)=&gt;{<br>    res.send(&quot;Welcome&quot;)<br>})<br><br><br><br>app.use(&#39;/openai&#39;, require(&#39;./routes/openaiRoutes&#39;));<br><br><br>const d = new Date()</pre><pre>npm start</pre><p>You should get this server running</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*opfzwoGN5ofg98ZoWixEcA.png" /></figure><p>open your browser and go to <a href="http://localhost:8000/">http://localhost:8000/</a> you should see</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*56vLK9Le6OPsZkdyqFR0BQ.png" /></figure><p>we can test the server by going to this link <a href="http://localhost:8000/openai/generateimage?prompt=Black%20SUV%20on%20a%20busy%20Road&amp;size=large&amp;num=4">http://localhost:8000/openai/generateimage?prompt=Black SUV on a busy Road&amp;size=large&amp;num=4</a></p><p>result will be like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XovpJ2c6WQR2CgBsKhNLew.png" /></figure><p>or if you use this chrome extension to beautify it, JSON Viewer</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yqur1kUUG6vi9yip5YgtyQ.png" /></figure><p>we are done with Generating Images in <a href="https://medium.com/@chuksonu700/artificial-intelligence-image-generation-with-node-js-part-2-f239549e5711">Part 2</a>. We will display the images correctly.</p><p>To learn how to deploy your Nodejs App, use this Link.</p><p>Thanks</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a98122581e4d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>