<?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 Peter Ugah on Medium]]></title>
        <description><![CDATA[Stories by Peter Ugah on Medium]]></description>
        <link>https://medium.com/@p.ugah.pu?source=rss-1f6381dfe529------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*eq5GklftuJxh_TA6TbUt2Q.png</url>
            <title>Stories by Peter Ugah on Medium</title>
            <link>https://medium.com/@p.ugah.pu?source=rss-1f6381dfe529------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 10:54:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@p.ugah.pu/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[Convert Your ExpressJs API’s to Lambda Functions (The Easy Way)]]></title>
            <link>https://medium.com/@p.ugah.pu/convert-your-expressjs-apis-to-lambda-functions-the-easy-way-a4ac286029f9?source=rss-1f6381dfe529------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4ac286029f9</guid>
            <category><![CDATA[aws-lambda]]></category>
            <dc:creator><![CDATA[Peter Ugah]]></dc:creator>
            <pubDate>Thu, 19 Sep 2019 05:57:10 GMT</pubDate>
            <atom:updated>2019-10-10T07:07:35.752Z</atom:updated>
            <content:encoded><![CDATA[<h3>Convert Your ExpressJs API’s to Lambda Functions (The Easy Way Part 1)</h3><p>let’s start by saying you built an <strong>ExpressJs </strong>application that provides several API endpoints which have worked well over time but as the application scales, you begin to encounter infrastructure challenges which include:</p><ul><li>the need to scale by increasing computing power</li><li>increased cost</li><li>all API endpoints point to the same server eg (/user, /post, /article) thereby putting more burden on the server.</li><li>need for load balancers</li></ul><p>So you think to your self there has to be a better way. Yes there is a better way</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*gCd2fQF_z_OjncWoR8_hWQ.jpeg" /><figcaption>Lambda to the rescue</figcaption></figure><h4>So what is AWS Lambda?</h4><p>For a more cloud-oriented definition refer to this <a href="https://en.wikipedia.org/wiki/AWS_Lambda">link</a>,<strong> </strong>however, I like to think of Lambda as a service that allows me to run code (Expressjs Server in our case) without worrying too much about the underline infrastructure. Another benefit to Lambda is <strong>COST. </strong>For more information on pricing please visit this <a href="https://aws.amazon.com/lambda/pricing/"><strong>link</strong></a></p><p><strong>PLEASE NOTE! as the title implies, this article is intended to show you an easy way to convert your existing express application to a lambda function which is good for learning purposes and small projects however on larger projects, you might want to use a CI/CD workflow and a version control tool like GIT, or a framework like </strong><a href="http://www.serverless.com/"><strong>serverless.com</strong></a><strong> which I’ll write about later on.</strong></p><h3>PROJECT</h3><p>a typical express application will usually look like this :</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6ea269deafed29584d7208cbe3224fe1/href">https://medium.com/media/6ea269deafed29584d7208cbe3224fe1/href</a></iframe><p>Let’s turns this to a lambda function, by modifying the above code and adding a lambda.js file to our project.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b93a1dc091fe15b6554698b73892c64c/href">https://medium.com/media/b93a1dc091fe15b6554698b73892c64c/href</a></iframe><p><strong>So what has changed?</strong></p><p>if you noticed, lines 24–27 which is responsible for starting the server on the specified port was commented out. I also exported the express application at line 30 so we can import it in lambda.js</p><pre>module.exports = app;</pre><p>I added a<strong> root GET route </strong>which we will use for testing our lambda function later on.</p><pre>// lambda testing</pre><pre>app.get(&quot;/&quot;, (req, res) =&gt; {</pre><pre>res.send(&quot;this lambda function is working fine&quot;);</pre><pre>})</pre><p>we also have a new file called <strong>lambda.js. </strong>This is where the magic happens. A<a href="https://github.com/awslabs/aws-serverless-express">wslab</a> released a package to ease the process of converting your express application to a lambda function. see <a href="https://github.com/awslabs/aws-serverless-express">here</a> for documentation.</p><p><strong>Please ensure lambda.js is created at the root directory level.</strong></p><h3>Procedure</h3><p>install aws-serverless-express</p><pre>npm install --save aws-serverless-express</pre><p>import <strong>app.js</strong> and <strong>aws-serverless-express </strong>into <strong>lambda.js</strong></p><pre>const app = require(&quot;./app&quot;);</pre><pre>const awsServerlessExpress = require(&quot;aws-serverless-express&quot;);</pre><p>create a server</p><pre>const server = awsServerlessExpress.createServer(app);</pre><p>export your lambda function</p><pre>exports.handler = (event, context) =&gt; {</pre><pre>return awsServerlessExpress.proxy(server, event, context);</pre><pre>}</pre><p><strong>ZIP your code</strong></p><p>select all necessary files and folders including your <strong>node_modules </strong>folder, <strong>app.js </strong>and <strong>lambda.js</strong> and zip<strong> them</strong>.</p><p>Log into your aws account to create a lambda function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O9UMSA8Mw0CwLDEBKspZpA.jpeg" /></figure><p>Click the create function button and give your function a name, ensure you select nodeJS as the runtime then click the create function button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_P9lym-_ebLIXBhvzjV0fw.jpeg" /></figure><p>successful creation of your lambda function will lead you to the page below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bSRsVAoIMaExCTWEIaQ6kQ.jpeg" /></figure><p>scroll down to the <strong>function code</strong> section.</p><p>Under the code entry type, select <strong>upload a zip file. </strong>Select your <strong>zipped</strong> code</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ISgth17CTDStPZaWgGJ2_w.jpeg" /></figure><p>change the <strong>Handler </strong>from <strong>index.handler </strong>to<strong> lambda.handler</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cQTm27Szd7Ps9qx9K8ruuQ.jpeg" /></figure><p>Click the save button at the top right corner.</p><p>once saved, your <a href="https://aws.amazon.com/cloud9/"><strong>cloud9</strong></a> code editor should look something like the image below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yq5A0rh8BEupFqn7L87UXg.jpeg" /></figure><h3>Test the lambda function.</h3><p>you remember the root get API we wrote in app.js at lines 20–22?</p><p>when testing your lambda function, it’s going to look for the root point of entry and execute the code there.</p><h3>Testing Procedure</h3><p>Click the <strong>test</strong> button to create a new text</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gY5ZoDVXXNxo_On3spiaKQ.jpeg" /></figure><p>enter an <strong>Event name</strong> e.g. <strong>test </strong>and click the<strong> create </strong>button.</p><blockquote>we skipped the JSON parameters, as we only want to see the lambda function execute the <strong>root</strong> GET request.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UhE3A7vdXF5OX7IVC-h-SQ.jpeg" /></figure><p>Finally, click the <strong>test</strong> button. The lambda function will be executed and you should see a response object containing the response from the <strong>app.js</strong> root GET request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QK6DbUwiBgsvEQTez0CIkw.jpeg" /></figure><p>Congratulations, you’ve turned your express application to a lambda function, but that’s not all. we need to be able to reference each endpoint and have our lambda function carry out the necessary actions. i.e <strong>{api/user}</strong> should carry out the operations in the <strong>user</strong> route likewise<strong> {api/post}. In my next post, we’ll learn how to do this using aws </strong><a href="https://aws.amazon.com/api-gateway/"><strong>API Gateway</strong></a><strong>.</strong></p><h3>Summary</h3><p>This is a great way to understand how aws lambda works and how you can convert existing express applications to lambda functions, however, for a CI/CD workflow, I’ll suggest using the <a href="https://aws-amplify.github.io/">aws amplify</a> or <a href="https://serverless.com/">serverless</a> framework.</p><p>using lambda also encourages the development of <a href="https://dzone.com/articles/steps-for-creating-serverless-microservice-with-aw">serverless microservices</a> by turning each endpoint to a lambda function.</p><p>if you find this article helpful, please give it a thumbs up and spread the good news. :).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4ac286029f9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Solve Bussiness Problems Using PowerApps]]></title>
            <link>https://medium.com/@p.ugah.pu/solve-bussiness-problems-using-powerapps-9e894685ca62?source=rss-1f6381dfe529------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e894685ca62</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[microsoft-power-apps]]></category>
            <category><![CDATA[microsoft-power-platform]]></category>
            <category><![CDATA[powerplatform]]></category>
            <category><![CDATA[powerapps]]></category>
            <dc:creator><![CDATA[Peter Ugah]]></dc:creator>
            <pubDate>Thu, 01 Aug 2019 11:18:42 GMT</pubDate>
            <atom:updated>2019-08-01T11:18:42.825Z</atom:updated>
            <content:encoded><![CDATA[<p>Depending on what tools you use internally, the term “PowerApps” might be new to you. Well, for me it was about 6 months ago when I joined my current organization as a graduate Intern.</p><p>Coming from a typical software development background and aswell pursuing a master in Computer Applications, I had mixed feelings about PowerApps as I thought to my self, there is no way PowerApps could do “Advanced stuff”.</p><p>After a few months of active usage, that&#39;s no longer my story. I have built quite advanced applications with PowerApps that integrate with various services, and more importantly, I build these applications relatively quickly compared to taking the native or hybrid mobile/desktop application development approach.</p><p>In this article, I share my experiences with PowerApps and how your organization can benefit from it by rapidly building applications to solve business problems.</p><h3><strong>What Is PowerApps</strong></h3><p>Microsoft PowerApps as the name implies is a product from Microsoft that allows both technical and non-technical folks built mobile/desktop applications from a web browser. It is provided as one of the Microsoft Power Platform cloud offerings. Click <a href="https://powerplatform.microsoft.com/en-us/">here </a>for more information.</p><h3><strong>What Can I Build With PowerApps</strong></h3><p>Frankly speaking, you can build any kind of application with PowerApps. Thanks to its wide range of Formulas and Connectors (More on this later on). I personally have built applications that carry out the following action:</p><ul><li>Send emails based on user actions</li><li>Auto-complete search queries with employee information as needed</li><li>Read and write data from external sources</li><li>Manage access rights/page views</li><li>Capture Images</li><li>Use other Microsoft services like flow, SharePoint, office 365, etc…</li></ul><h3>How PowerApps works</h3><p>Wanna see comprehensive examples? visit the PowerApps showcase site <a href="https://powerapps.microsoft.com/en-us/partner-showcase/">here</a>. The intent of this article is not to start a PowerApps tutorial nevertheless I will briefly describe how PowerApps works with a simple todo application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*P-oXHS6mjfX-xcga-UsBtg.gif" /><figcaption>PowerApps Todo Application by Peter Ugah</figcaption></figure><p><strong>Controls</strong>: This is things like buttons, text fields, dropdowns and the rest. unlike traditional programming where we explicitly declare these things with XML, In PowerApps, you simply click on a button, text etc.. and you can start working with it immediately.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*hk4o68QD6CBQ4Iyl1uBcUw.gif" /><figcaption>PowerApps Button and Label showcase</figcaption></figure><p><strong>Formulas: </strong>This is where most of the magic happens. The PowerApps team has created formulas or in other words, <strong>functions</strong> that enable you to build applications to varying levels of complexity. A simple example is transforming a text from lower to uppercase, using the <a href="https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-lower-upper-proper"><strong>Upper()</strong></a> function.</p><p>Upper(“transform me”) would transform the words in quotes to “TRANSFORM ME”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*sKvnIhoYZe-6j_vFHdL3jQ.gif" /></figure><p><strong>Connectors: </strong>Connectors, as the name implies, is the way we connect to different services, databases, API’s, etc in PowerApps. A case scenario would be building a PowerApps that connects to an on-prem database in your organization using a custom connector to perform CRUD operations. Some are straight forward to implement especially if its a service within the Microsoft ecosystem, while others require some form of collaboration between the PowerApps developer and your DB / applications team.</p><figure><img alt="PowerApps Connectors" src="https://cdn-images-1.medium.com/max/1024/1*0v2goT9lDEVlqsaJHjyb6g.png" /><figcaption>PowerApps Connectors Image</figcaption></figure><h3>Experiences</h3><p>if you come from a software development background, you’ll require a little mind twist especially if you are not in the Microsoft ecosystem, to work with PowerApps. As a tool it is great, however, it lacks some features some of which are listed below:</p><ul><li><strong>Function Declaration /Expression</strong>: PowerApps comes out of the box with so many formulas (Functions) to do a lot of stuff, however, something I found quite limiting is the inability to declare reusable functions as I&#39;d normally do if programming in java, javascript, etc. This in effect means if I was going to perform an operation thrice, I would have to copy and paste the code 3 times and adjust the parameters as appropriate</li><li><strong>Dynamic Variables: </strong>we declare variables in PowerApps using the <a href="https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-updatecontext">UpdateContext</a> and <a href="https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-set">Set</a> formula, as the case may be. However, PowerApps is not really dynamic enough for reusability, also considering the fact all functions are tailor-made.</li><li><strong>Hybrid In Nature: </strong>Like Cordova PhoneGap that runs on top Google’s V8 engine, every mobile app you’ll build runs on top of Microsoft&#39;s PowerApps Application, which would be installed from the play store and app store for android and IOS respectively. From a business point of view, this is not really a downside, however, this is one case I feel PowerApps is not suitable for commercial products.</li></ul><h3><strong>Summary</strong></h3><p>PowerApps is a tool different units/teams within an organization can use to build applications that solve business problems. It is relatively easy to get started with and is secured. PowerApps is just one of Microsoft’s Power Platform cloud offerings.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e894685ca62" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>