<?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 Rodrigo Mencos Murga on Medium]]></title>
        <description><![CDATA[Stories by Rodrigo Mencos Murga on Medium]]></description>
        <link>https://medium.com/@rmencos?source=rss-6e1e44a4424d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*T_pY2vt6q22s3pIeG1rxBw.png</url>
            <title>Stories by Rodrigo Mencos Murga on Medium</title>
            <link>https://medium.com/@rmencos?source=rss-6e1e44a4424d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 08:34:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rmencos/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[Deploying Resources with IaaC Using Lambdas]]></title>
            <link>https://medium.com/geekculture/deploying-resources-with-iaac-using-lambdas-d987d39b6251?source=rss-6e1e44a4424d------2</link>
            <guid isPermaLink="false">https://medium.com/p/d987d39b6251</guid>
            <category><![CDATA[lambda]]></category>
            <category><![CDATA[cloudformation]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[infrastructure-as-code]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Rodrigo Mencos Murga]]></dc:creator>
            <pubDate>Sun, 09 May 2021 11:14:27 GMT</pubDate>
            <atom:updated>2021-05-17T08:20:34.783Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DtAixHz3mQPg9AJ6.png" /></figure><p>Have you ever wonder if it’s possible to create, manage and deploy <em>infrastructure as a code</em> using AWS CloudFormation through lambdas?</p><p>Some of the benefits i thought while researching this route were:</p><ol><li>Granular control of what is being created, modified or deleted on your infra.</li><li>Easier to migrate to another vendor.</li><li>Faster to deploy multiple resources at the same time.</li><li>Having all wrapped inside AWS stacks.</li></ol><h3>The initial approach</h3><p>Creating a resource on an AWS account with a Lambda came with some ideas. The one I tested follows this path:</p><ul><li>A json template file stored inside a bucket.</li><li>One lambda will run and read the json file inside the bucket</li><li>The lambda will “talk” with AWS CloudFormation and send some parameters to create a stack. One of those parameters will be the <strong>json template</strong>.</li><li>AWS CloudFormation will create the resources specified on the json template.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DtAixHz3mQPg9AJ6.png" /></figure><h3>Testing time!</h3><p>First you need to put the json template inside a bucket. Feel free to copy the one i used here:</p><p><a href="https://github.com/wifiwolfg/lambda-iaac/blob/main/s3template.json">https://github.com/wifiwolfg/lambda-iaac/blob/main/s3template.json</a></p><p>This will create a stack with a public s3 bucket ready to host a website. This file was saved as <strong>s3template.json</strong> inside a s3 bucket. The parameter you will need is the object URL.</p><h3>The Lambda</h3><p>For this test I created a Lambda on python. You can download it here:</p><p><a href="https://github.com/wifiwolfg/lambda-iaac/blob/main/lambda-params.py">https://github.com/wifiwolfg/lambda-iaac/blob/main/lambda-params.py</a></p><p>Or if you prefer copying it from here, this is how it looks:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a24acce20c4ecd58e18f3572ac67e63c/href">https://medium.com/media/a24acce20c4ecd58e18f3572ac67e63c/href</a></iframe><blockquote><strong><em>Important:</em></strong><em> For this to work, when I created the lambda, the role attached to it needed permissions to read S3 resources and writing actions to </em>CloudFormation<em> resources.</em></blockquote><p>You can notice the <em>Template_URL</em> pointing to the s3 object URL that contains the json.</p><h3>Results</h3><p>We can go to CloudFormation and see the stack was successfuly created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5gLT_MXfzAW7n7rk.png" /></figure><p>Then if you go s3, you will be able to find the new bucket.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rnA_iKTQBhtB_w-W.png" /></figure><h3>Conclusion</h3><p>We are able to have a lambda which can be triggered in many ways and then it will create resources using CloudFormation and have IaaC along with it.</p><p>There are lots of use cases where this can be very helpful. How do you think you can use this?</p><p><em>Originally published at </em><a href="https://mirairo.net/deploy-s3-iaac-lambdas-aws/"><em>https://mirairo.net</em></a><em> on May 9, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d987d39b6251" width="1" height="1" alt=""><hr><p><a href="https://medium.com/geekculture/deploying-resources-with-iaac-using-lambdas-d987d39b6251">Deploying Resources with IaaC Using Lambdas</a> was originally published in <a href="https://medium.com/geekculture">Geek Culture</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploy Strapi in minutes]]></title>
            <link>https://medium.com/kor-framework/deploy-strapi-in-minutes-e09003c93a39?source=rss-6e1e44a4424d------2</link>
            <guid isPermaLink="false">https://medium.com/p/e09003c93a39</guid>
            <category><![CDATA[headless-cms]]></category>
            <category><![CDATA[strapi]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[kor]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Rodrigo Mencos Murga]]></dc:creator>
            <pubDate>Sat, 27 Mar 2021 00:22:38 GMT</pubDate>
            <atom:updated>2021-03-27T00:22:38.557Z</atom:updated>
            <content:encoded><![CDATA[<h3>Having a headless CMS in a Serverless Environment</h3><p>Is it possible to have your site running with a headless CMS in a serverless environment to leverage all of the benefits of serverless? Yes it is possible, it used to be a difficult task that required specific knowledge, but now with KOR it is something that anyone is able to do in a few minutes.</p><p>Before I start, what is a headless CMS? What does that even mean?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w6NkUbneHDycP1V1bIw67A.png" /><figcaption>Image from <a href="https://tsh.io/blog/strapi-node-js-headless-cms/">https://tsh.io/blog/strapi-node-js-headless-cms/</a></figcaption></figure><p>Basically, in a headless CMS you will have a backend UI where you can create an API and serve content over multiple endpoints.</p><p>Then, on your front-end side, mobile app, or web app, you can consume that API, which will serve your data (content).</p><h3>Why would I need to use a Headless CMS?</h3><ol><li>Since the CMS doesn’t render any content, editing it will be much faster than a traditional CMS.</li><li>You can serve content on multiple channels. Control how and where your content appears (e.g. web apps, mobile apps, or websites).</li><li>Use your favourite framework to consume the APIs.</li></ol><p>Now imagine having the benefits of a headless CMS combined with all the advantages of serverless! No server management, increased performance, pay for what you use, infinitely scalable and faster to build.</p><p>Ok, let’s get started.</p><h4>Tools to create and manage your website, or app, with an open-source headless CMS in a serverless environment</h4><p>Ok, so this is what I will be using for this tutorial:</p><ol><li><a href="https://www.getkor.io/">KOR </a>for deploying Strapi.</li><li><a href="https://strapi.io/">Strapi.</a> The best open-source headless CMS out there.</li><li>AWS, of course (KOR has a 1 click integration so you only have to create an AWS account and KOR will automate the rest).</li></ol><h4>Deploying Strapi</h4><p>Once you log into your KOR account, go down to the templates section (orange icon) and you will find 3 options. A static site, a webapp and Strapi.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J3NZaSCQqfkfdIS5MV8MQA.png" /></figure><p>After you select Strapi, you will need to connect your AWS account. That’s quiet easy though. Just click the “Authorize AWS” button and follow the steps on the stack creation tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iwZ595h5H3nAnUEMUMngCg.png" /><figcaption>Strapi Template</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_4K0Zujvn5ixYTku7eH5pw.png" /><figcaption>On the AWS stack creation go to the bottom, click the checkbox, and then click “Create stack”</figcaption></figure><p>This will create a stack with the necessary resources to allow KOR to create all the infra for you. Then go back to KOR and wait for the confirmation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wq9w4h_Cb0bhsYCDWZOAVw.png" /></figure><p>Ok, so now that the AWS connection worked as expected. Let’s click next to complete the process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mtibZVjE51j6w2OTWrdYrA.png" /></figure><p>On step number 2, if you have a domain registered on your account, you can use it without any problems (with subdomains too!). If you don’t have any domains on AWS and want KOR to generate one for you, you can click “<strong>Create template without a domain</strong>”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LbIMHW5mLTHMJiv_Kvd8iQ.png" /><figcaption>Sit back and relax while the magic happens.</figcaption></figure><p>After it finishes, you will get 2 links. One with the Strapi Admin Panel (in production mode) and a template for the front-end. Let’s see how the admin panel looks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k57b_4QqT7oxuK-GRQdRhg.png" /><figcaption>All good around here</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FstVILKCin-QTo9xgJoUcg.png" /><figcaption>The front-end template with the domain name I chose.</figcaption></figure><p>Now we you need to set up the role permission inside Strapi. For that go to settings — roles and edit the “public” role.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PR0u8k0lxiVXZSXPG6U_3Q.png" /></figure><p>Click on the checkbox “find” and save the changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ws7xWtq57V4CBLwHhmjQxw.png" /><figcaption>All done.</figcaption></figure><p>Then you can go to the Landing-page section and modify the content of your website!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZlURQO56UzfiE1NP9V9Xog.png" /></figure><p>If you want to see how the “view” looks when you start modifying the template, click the “configure the view” button below the information box.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QnqZE4mLqBH5S0gIAswLWg.png" /></figure><p>After modifying some content, this is how the react template looks:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*SN3FAn5wVdikP5EPPJheMw.gif" /></figure><h3>Metrics</h3><p>If you wish to view metrics like visitors, resources, CloudFront data, or you want to see what’s under the hood (the resources powering your CMS that were auto created by KOR), then go back to your KOR account. Click the Habitat that was made for your Strapi creation and then look within the monitoring tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*73-8o3FLfQWCWlyWQwDJNw.png" /></figure><h4>Is it possible to modify the react front-end template even further?</h4><p>Yes. If you wish to modify certain things that are not possible with the Strapi CMS (e.g. custom colors, text, buttons, etc), you can change the git-remote inside KOR and modify the template as you wish.</p><p>For this, click on repositories and find the one that starts with “<strong><em>front-end…</em></strong>”. Click the master branch and a window will pop up to change the git remote.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YEConfSZ1_dB-rLQAi6Mug.png" /><figcaption>Repositories section inside KOR</figcaption></figure><p>Once you click the “change git remote” button, point to a <strong>blank repository</strong> of your own (KOR will clone the current code to your <strong>empty repo</strong>), select your git credentials and that is it. You will have the front-end already cloned inside your repository which you can modify locally and push changes as usual.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FLC1u9NGIaKdeQDivhSi5Q.png" /></figure><h4>How to pull the git updates to KOR?</h4><p>Whenever you push new code to your repository, KOR will need to be updated as well. Just click the master branch, and click the “pull” button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*O_I7lGxutxV1ybzZ_gL1Xg.png" /></figure><h4>What about creating more pages or APIs inside Strapi?</h4><p>That’s possible too! But let me explain. Strapi uses a “content-type builder” for creating content BUT, it only works when Strapi is running in a development environment. “S<strong>trapi develop</strong>” on the terminal.</p><p>Since KOR is running the production stage of Strapi, this is not possible to do it on the web admin panel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fVEb6VvfETq9iG9R06vZNA.png" /></figure><p>If you wish to create more content, then you can go back to repositories inside KOR and do the same “change git remote” like I explained previously but with the “<strong><em>lambda…</em></strong>” repository.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PB5pluJPTU7M3iU-M9x-Ag.png" /></figure><p>Then, run Strapi locally in your machine with “S<strong>trapi develop</strong>” and do any changes you need. After you update the repository, KOR will take care of the rest and deploy the changes for you.</p><p>I hope you give KOR a try and get your Strapi CMS along with your website running in a serverless environment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e09003c93a39" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kor-framework/deploy-strapi-in-minutes-e09003c93a39">Deploy Strapi in minutes</a> was originally published in <a href="https://medium.com/kor-framework">KOR Framework</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Going serverless on contact-forms]]></title>
            <link>https://medium.com/kor-framework/going-serverless-on-contact-forms-f25c40749bd4?source=rss-6e1e44a4424d------2</link>
            <guid isPermaLink="false">https://medium.com/p/f25c40749bd4</guid>
            <category><![CDATA[kor]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[lambda]]></category>
            <category><![CDATA[contact-form]]></category>
            <dc:creator><![CDATA[Rodrigo Mencos Murga]]></dc:creator>
            <pubDate>Mon, 11 Jan 2021 18:24:54 GMT</pubDate>
            <atom:updated>2021-01-12T17:00:52.024Z</atom:updated>
            <content:encoded><![CDATA[<h3>Building a serverless contact form in a few quick minutes</h3><p>What are we going to be using?</p><ol><li><a href="https://www.getkor.io/">KOR Framework</a></li><li>AWS SES</li><li>IAM</li></ol><p>This is a continuation of one of my previous posts “<a href="https://medium.com/kor-framework/building-a-serverless-vue-js-landing-site-4369eed8e3ea">Building a Serverless Vue.js Front End in just a few minutes</a>”. I thought it would be useful to make the contact form at the bottom of the page actually work, and why not do it in a serverless way?</p><p>First I need to log into my KOR account. I will start by uploading a repository where I have my Lambda Function code. It looks like this:</p><p><strong>index.js</strong></p><pre>const sendEmail = require(&#39;./sendEmail&#39;);<br><br>exports.handler = async (event, context) =&gt; {<br>    return sendEmail(event.name, event.subject, event.message, event.email)<br>        .then((response) =&gt; {<br>            context.done(null, &#39;Email Sent&#39;);<br>    }) <br>    <br>};</pre><p><strong>sendEmail.js</strong></p><pre>const AWS = require(&#39;aws-sdk&#39;);<br>const ses = new AWS.SES();<br> <br>function sendEmail(name, subject, message, senderEmail) {<br>  const params = {<br>    Destination: {<br>        ToAddresses: [<br>            &#39;rodrigo@kor-test.com&#39;<br>        ]<br>      },<br>    Message: {<br>        Body: {<br>            Text: {<br>                Data: name + message,<br>                Charset: &#39;UTF-8&#39;<br>            }<br>        },<br>        Subject: {<br>            Data: subject,<br>            Charset: &#39;UTF-8&#39;<br>        }<br>    },<br>    Source: &#39;rodrigo@kor-test.com,<br>    ReplyToAddresses: [senderEmail]<br>  }<br>  return ses.sendEmail(params).promise();<br>}<br> <br>module.exports = sendEmail;</pre><blockquote>The original code I modified can be found here: <a href="https://wanago.io/2020/08/31/aws-lambda-contact-form-simple-email-service/">https://wanago.io/2020/08/31/aws-lambda-contact-form-simple-email-service/</a></blockquote><p>After cloning my function, I can confirm that everything is fine by clicking any file inside and inspecting it. All good here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VYbgFlu2BS6fbakeKkQqRg.png" /></figure><p>Now I need to enable the SES permitions into the role that KOR controls. This is very easy to do. Inside my AwesomeNuts habitat, I click on settings and then on Habitat Roles.</p><p>I see there that <em>KOR-TEMPLATE-1606783402106 </em>handles the resources of my habitat.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BGMSjronc8_2WvILUHsa1Q.png" /></figure><p>Next, I need to go to AWS IAM roles section and search for the habitat role name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vMzYs_IWMsGJm7J1YaP7gQ.png" /></figure><p>Good, now inside the role I will find the KOR policy attached.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6-LCD9RKTQ-PNKbRM2bWVw.png" /></figure><p>Now I need to edit the policy and add the following action:</p><pre>{<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Action&quot;: [<br>                &quot;ses:SendEmail&quot;,<br>                &quot;ses:SendRawEmail&quot;<br>            ],<br>            &quot;Resource&quot;: &quot;*&quot;<br>        },</pre><p>For the sake of the test, I will leave the resource with *.</p><h4>AWS SES</h4><p>Ok, before I proceed I will add a quick step to verify my email on AWS SES. This is the same email that you can see inside the lambda function code.</p><p>On AWS SES, I will start by verifying the domain:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/223/1*kWcCktHJAdCBqy65sAZ_2w.png" /></figure><p>Since my domain is registered on AWS, I recieved the prompt to add the <em>Route53 </em>records.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*DgiQ3XFSyHUtJWs9KxhIlQ.png" /></figure><p>After a couple of minutes, the domain was verified.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*irXzYkNgoIACrDDw1Chhew.png" /></figure><p>Now I just needed to go to <strong>Email Addresses</strong>, add my email and confirm it via the email they sent to me.</p><p>All right, we are ready to move on to the fun stuff.</p><h4>Creating the Function</h4><p>I’ll go back to my<strong> AwesomeNuts</strong> Habitat on KOR — Settings — Functions — New Function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CZrYucUa2x2g9nqNsPL0FQ.png" /></figure><p>Here I will select my <strong>LambdaContact</strong> repository, the role, put the handler and select Nodejs 12.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*9nfr7NHOf3HJebtSI62ALw.png" /></figure><h4>Deploying the Function</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3aPs8Yb2zddd_rbeYX2rjA.png" /></figure><p>The next step is going to <strong>Releases </strong>and click the “<strong>Deploy All</strong>” button.</p><p>If I want to test the function I can click on the yellow “<strong>Test Function</strong>” button and do the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*EsbaUUNPXGYhF3uDfoe1MA.png" /></figure><p>After I selected RequestResponse, I put this payload and click invoke:</p><pre>{<br>  &quot;email&quot;: &quot;some@email.com&quot;,<br>  &quot;subject&quot;: &quot;testing2&quot;,<br>  &quot;message&quot;: &quot;Hello my friend&quot;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/1*GamoSsayfTRTtrrtL66e7g.png" /><figcaption>Nice! Everything worked.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/537/1*lg_G1ympbtaIT1XWk2ngLA.png" /><figcaption>The email arrived to my inbox.</figcaption></figure><h3>Wrapping it all up</h3><p>Ok, I have the function, the permissions, and SES working, but there is still one piece missing. How am I going to send information from<strong> </strong>my website?</p><p>For this, I need to link my lambda with an API Gateway and create a POST method. Thankfully, with KOR this is extremely easy to do.</p><p>In my habitat settings, I will create a new API Gateway which will take care of all the hard work for me.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*mkhL01WkOKz2ZswYdRxbXg.png" /></figure><p>I named my API Gateway “ContactForm”. Then after creating it, I can add an endpoint to it. I will create a POST method.</p><p>The nice thing here is that I can select the function that will be triggered by the method. In my case it is the <em>LambdaContact</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*2rRZOW8nzYgpDMBT1Yhq1Q.png" /></figure><p>Awesome. Let’s take a look at the result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*DxaX0S6KnidrbFP3HOkcIw.png" /></figure><p>Ok so after this, I have my Endpoint ready to be used on my code. Let’s give it a try on Postman:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hV3YSFb0wuPAHOgmx1mHlg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/723/1*yXEtcZZ2jAp5Y9gtAZLy3Q.png" /><figcaption>Hey John!</figcaption></figure><p>Now I can use that endpoint inside my Vuejs website. But that is for another post.</p><p>Thanks for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f25c40749bd4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kor-framework/going-serverless-on-contact-forms-f25c40749bd4">Going serverless on contact-forms</a> was originally published in <a href="https://medium.com/kor-framework">KOR Framework</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[One easy way to have an e-commerce site on Vuejs]]></title>
            <link>https://medium.com/kor-framework/one-easy-way-to-have-an-e-commerce-site-on-vuejs-e18a5118e758?source=rss-6e1e44a4424d------2</link>
            <guid isPermaLink="false">https://medium.com/p/e18a5118e758</guid>
            <category><![CDATA[ecommerce]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[kor]]></category>
            <dc:creator><![CDATA[Rodrigo Mencos Murga]]></dc:creator>
            <pubDate>Thu, 17 Dec 2020 18:54:03 GMT</pubDate>
            <atom:updated>2020-12-17T19:56:49.117Z</atom:updated>
            <content:encoded><![CDATA[<h3>Deploy a Serverless e-commerce Site on Vuejs in a few Quick Steps</h3><p>Hey folks,</p><p>Last time I wrote a simple tutorial on how to start a serverless Vuejs site. You can check it out here <a href="https://medium.com/kor-framework/building-a-serverless-vue-js-landing-site-4369eed8e3ea">https://medium.com/kor-framework/building-a-serverless-vue-js-landing-site-4369eed8e3ea</a></p><p>After that was published I was asked if there was any easy way to add an ecommerce platform to that same landing site, and there is!</p><p>Before we start, I will show you how the final result looks:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*ycLl6Bx0AkXVwRsWbDlGJQ.gif" /></figure><h3>What do you need?</h3><p>If you followed my previous post, you already should have a</p><ul><li><a href="https://app.getkor.io/">A free KOR account</a></li><li><a href="https://aws.amazon.com/free">An AWS account</a></li><li>Your Vuejs landing site.</li></ul><p>If you still don’t have any of this, go and check out <a href="https://medium.com/kor-framework/building-a-serverless-vue-js-landing-site-4369eed8e3ea">my previous post.</a></p><h3>The approach</h3><p>The way this will work is by embedding an already existing e-commerce shop made on <a href="https://www.ecwid.com/">https://my.ecwid.com</a> (they also have a free tier option, yay!).</p><p>“Hey Rodrigo, but Ecwid already has an instant site option, why do I need this?”</p><p>There are many benefits of having your own landing site instead of using the predefined ones:</p><ol><li>You will have FULL control of everything. Do you need a blog section? A fancy header? Or if there is anything nice or custom that you want to implement then you need control. At the moment, with Ecwid static sites this is not possible.</li><li>Very cost effective infraestructure. Since you are doing it serverless with KOR watch the spend $$$ go down.</li><li>Better, faster, stronger. Even though you could do this with Wordpress and plugins, you will suffer from a slow and clumsy site. (Plus, you would need to host it somewhere and private VPS cost $$$). With this solution your site will be very fast and can scale on demand.</li></ol><h3>Step 1</h3><p>Go and make a <a href="https://www.ecwid.com/">free ecwid account </a>. Set up your shop as you want.</p><h3>Step 2</h3><p>For this to work, we need to create a new component inside our Vuejs site. So go to the folder were you stored your local code for your landing site and create a new file in the folder where you stored the components. This is what my <em>Ecwid.vue </em>looks like:</p><pre>&lt;template&gt;<br>&lt;div :id=&quot;`my-store-${storeId}`&quot;&gt;&lt;/div&gt;<br>&lt;/template&gt;<br>&lt;script&gt;</pre><pre>function injectEcwidScript(storeId) {<br>const ecwidScript = document.createElement(&quot;script&quot;);<br>ecwidScript.setAttribute(&quot;type&quot;, &quot;text/javascript&quot;);<br>ecwidScript.setAttribute(&quot;charset&quot;, &quot;utf-8&quot;);<br>ecwidScript.setAttribute(&quot;data-cfasync&quot;, &quot;false&quot;);<br>ecwidScript.setAttribute(<br>&quot;src&quot;,<br>`https://app.ecwid.com/script.js?${storeId}&amp;data_platform=code&amp;data_date=2020-02-17`<br>);<br>ecwidScript.onload = injectEcwidProductBrowser(storeId);</pre><pre>document.head.appendChild(ecwidScript);</pre><pre>}</pre><pre>function injectEcwidProductBrowser(storeId) {<br>return function () {<br>const ecwidBrowserScript = document.createElement(&quot;script&quot;);<br>ecwidBrowserScript.setAttribute(&quot;type&quot;, &quot;text/javascript&quot;);<br>ecwidBrowserScript.setAttribute(&quot;charset&quot;, &quot;utf-8&quot;);<br>ecwidBrowserScript.text = `xProductBrowser(&quot;categoriesPerRow=3&quot;,&quot;views=grid(20,3) list(60) table(60)&quot;,&quot;categoryView=grid&quot;,&quot;searchView=list&quot;,&quot;id=my-store-${storeId}&quot;);`;<br>document.head.appendChild(ecwidBrowserScript);<br>    }<br>}</pre><pre>export default {<br>name: &quot;Ecwid&quot;,<br>props: {<br>  storeId: {<br>  type: Number,<br>  default: 1003<br>  }<br>},</pre><pre>mounted() {<br>  injectEcwidScript(this.storeId);<br> }<br>};<br>&lt;/script&gt;<br>&lt;style&gt;<br>&lt;/style&gt;</pre><p>This is stored in my <em>components</em> folder.</p><h3>Step 3</h3><p>Now we just need to call the component wherever we need the products to be shown. In my case, I had a <em>Services.vue</em> component where I want to show the products. This is the code:</p><pre>&lt;script&gt;<br>import Ecwid from &quot;./Ecwid.vue&quot;;</pre><pre>export default {<br>name: &quot;App&quot;,<br>  components: {<br>    Ecwid<br>  }</pre><pre>};<br>&lt;/script&gt;</pre><pre>&lt;template&gt;<br>  &lt;!--START SERVICES--&gt;<br>  &lt;section class=&quot;section pt-5&quot; id=&quot;services&quot;&gt;<br>    &lt;div class=&quot;container&quot;&gt;<br>      &lt;div class=&quot;row&quot;&gt;<br>        &lt;div class=&quot;col-lg-8 offset-lg-2&quot;&gt;<br>          &lt;h1 class=&quot;section-title text-center&quot;&gt;Nuestros Productos&lt;/h1&gt;<br>            &lt;div id=&quot;app&quot;&gt;<br>              &lt;Ecwid :storeId=&quot;3111111&quot;/&gt;<br>            &lt;/div&gt;<br>            <br>          &lt;div class=&quot;section-title-border margin-t-20&quot;&gt;&lt;/div&gt;<br>        &lt;/div&gt;<br>      &lt;/div&gt;<br>    &lt;/div&gt;<br>  &lt;/section&gt;<br>  &lt;!--START SERVICES--&gt;<br>&lt;/template&gt;</pre><p><strong>IMPORTANT: </strong>You will need to change the storeId for your own ecwid store.</p><p>Here is where you can find your store Id. Log into your ecwid panel, find your store ID at the bottom of the dashboard section, and copy the code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BuJmab1EfpIWgPjLFii0JA.png" /></figure><h3>Step 4 — Testing time</h3><p>Let’s update our code on KOR and see what happens. After we pull the changes from the repo, we click on “<em>update</em>” inside the releases section, more info about this <a href="https://medium.com/kor-framework/building-a-serverless-vue-js-landing-site-4369eed8e3ea">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ymYpTcM6QsydeWYGM90Ihg.png" /></figure><p>After a few minutes, we will see how our site looks:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PWMPi_V9P58rBamzaPPOwA.png" /></figure><p>Now you just need to update your ecwid store and all the changes will be reflected automatically on your cool vuejs site.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e18a5118e758" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kor-framework/one-easy-way-to-have-an-e-commerce-site-on-vuejs-e18a5118e758">One easy way to have an e-commerce site on Vuejs</a> was originally published in <a href="https://medium.com/kor-framework">KOR Framework</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Serverless Vue.js landing site]]></title>
            <link>https://medium.com/kor-framework/building-a-serverless-vue-js-landing-site-4369eed8e3ea?source=rss-6e1e44a4424d------2</link>
            <guid isPermaLink="false">https://medium.com/p/4369eed8e3ea</guid>
            <category><![CDATA[static-site]]></category>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[kor]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[serverless]]></category>
            <dc:creator><![CDATA[Rodrigo Mencos Murga]]></dc:creator>
            <pubDate>Tue, 01 Dec 2020 21:02:59 GMT</pubDate>
            <atom:updated>2021-03-19T02:52:02.852Z</atom:updated>
            <content:encoded><![CDATA[<h3>Building a Serverless Vue.js Front End in just a few minutes.</h3><p>In this post I will show you how you can easily build a serverless Vue.js landing site (or front-end) with KOR. We will automate the “Building for Production” part and get you ready to focus on making cool websites.</p><p>Why serverless?</p><p>1. You don’t need to manage any servers or microservices.<br>2. Fast deployments.<br>3. Pay for only what you use.<br>4. Scalable to the moon.</p><p>Why KOR?</p><ol><li>Deployments can be done fast.</li><li>You can combine CI with easy-to-follow templates.</li><li>Updating a site to the latest version is a piece of cake.</li><li>Centralized information about my infra “which is automatically deployed”.</li></ol><p><strong>Prerequisites:</strong></p><ol><li>You need an AWS account.</li><li>Register a domain on Route53.</li><li>Create a <a href="https://app.getkor.io/">free KOR account.</a></li></ol><h4>Step 1: Creating a habitat</h4><p>In this example I will be making the front-end for <em>Awesome Nuts</em> company. The place within KOR that controls everything you are building is called a “Habitat.” Let’s go to our <em>Habitats</em> section to create a New Habitat.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dJhRs3Yb0b2qV-ipz3kUkw.png" /></figure><blockquote>Click the “Authorize AWS” Button.</blockquote><p>After you click the “Authorize AWS” button a windowwill open inside your AWS CloudFormation. Scroll to the bottom, confirm the acknowledge box, and then Click the “Create Stack” button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R-9q5_gkhADse9OAO3dFZg.png" /></figure><p>During this process, KOR will automatically create a user for managing all your AWS resources in a controlled and safe way. After a few minutes you will see your new habitat. If you see a random name, don’t worry, you can rename your habitat.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o4ilRySB2RTCGFBFPJlNCQ.png" /></figure><h4>Step 2: Connecting Git Creds and Cloning the Repo</h4><p>The code I have for <em>Awesome Nuts</em> is on a Github’s private repository.</p><p>To connect a repository, click the settings icon on the bottom-left of the screen and navigate to the key. Click the button: <strong>+Git Credential.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*abwcErYzVSu4PciKOVTweA.png" /></figure><p>After clicking the button, you will be able to choose to connect your Github account or a manual key:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XZ83-cgSX9mifrHwUorgGA.png" /></figure><p>On the prompt, enter a name for your creds and click the github icon to connect your account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*4pCCxdgrwz6lZTR9g0jcNA.gif" /></figure><blockquote>Ok, now what?</blockquote><p>Let’s clone the repo. Navigate back to the working area and click on <em>Repositories</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mcW32F5dwNgDCz5dJ764RA.png" /></figure><p>Click on “Add New” and select the <strong>Clone a Repository </strong>message. We will get a new window so we can clone our repository.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tz4GXoopuSO2MY_cpzy5Ig.png" /></figure><p>On function name you can enter any name you want. Just remember to go to your repository and copy the <strong>Clone with HTTPS</strong> link. Select your previously added git credentials and click the <em>Clone Now</em> button.</p><blockquote>Awesome!! Can we see how well we are doing?</blockquote><p>After cloning the repo you should be able to see the master branch:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*uKUWzQlG7vfoIrTofFpuFw.png" /></figure><h4>Step 3: Creating the site</h4><p>We are a few clicks away from having our front-end working. Next, let’s go inside the habitat we created on <em>step 1</em> and go to settings:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WO45_wepZc_wbBlwuvpJ5Q.png" /></figure><p>Cool, now click on <em>Static Sites</em> setup and click on <strong>+New Site</strong>. You will get a new prompt where you can select the repository we cloned on <strong>step 2</strong> and also you should see your AWS Registered Domains. Finally, if you wish to have a subdomain attached to this front-end, you can do it here. If you don’t need a subdomain just leave it blank.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/1*Ud9Yb58wfSotpiL7bj7kOQ.png" /></figure><p>Once you are done click <strong>Save</strong> and sit back and relax for a few minutes until you see the static site info:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*yGokrpuXybvrGn1_3_zHew.png" /></figure><blockquote><strong>Important: </strong>It usually takes around 3–5 minutes.</blockquote><h4>Step 4: Building the app</h4><p>Is it working now?!</p><p>No, not yet. If you are working with React, Angular or Vue, you know we need to build it for production. So let’s go ahead and do that final step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0s2Yd_EjQp83HPWBe4Gspw.png" /><figcaption>Releases Area</figcaption></figure><p>Go to the <em>Releases</em> area as shown in the previous screenshot. You will see that under <em>Sites</em>, we will have AwesomeNuts ready to be deployed. <strong>DON’T DEPLOY YET</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*DK0b3YAhS1NV3A6sCh5P6g.png" /></figure><p>First click on the name and enable the CI checkbox. Then a command window will show up. Here you can put any CI command you need to run periodically. In my case, I need to remove the comment on the <em>line 29</em>, <em>37, 57</em> and input this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*IAaTS78B_NiQ7xnvtfLX5A.png" /><figcaption>- npm install</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*s7btS27QcF-eEXQd_Xi7Og.png" /><figcaption>- npm run-script build</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*-jGrv9gWXBr_F_aSKPPn5Q.png" /><figcaption>base-directory: dist</figcaption></figure><p>I’m using <em>npm</em> to build my front-end so I need to install it and run later on. If you are not familiar with CI don’t worry. Just change those lines according to what you are using it for. The artifacts are already pre-configured on <em>line 51</em>. You can also change <em>line 57</em> for the base directory that your package manager creates.</p><p>If you are familiar with CI, go ahead and modify whatever you need :)</p><p>After this, I just needed to click <strong>Deploy</strong></p><h4>Step 5: Checking our app.</h4><p>After you click deploy, go to the CI/CD section and you will be able to see your site being created:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w6BSbGFCyk79iIGl9DkcQw.png" /></figure><p>You can also click on <strong>Show Logs</strong> to see what is going on:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GdbXhbVSkIW1JTezeXP_MA.png" /></figure><p>Cool right? <br>Your front-end will be deployed with CloudFront and HTTPS out of the box.</p><p>Final result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*o2QhJ5Qfx-ibko4M4j5OjA.gif" /></figure><h4>Tips</h4><p>Keeping your Front-end updated with KOR. You can work on your project and make changes through Git, but how do you update it on KOR?</p><p>After making changes to your repository, go to KOR’s repository section and click the branch below the name:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/1*3G_nFRdfOOjHP5aUlerC1g.png" /></figure><p>Then, you will get this prompt:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*d5OkdAq7bH6IDkBV_xV6zQ.png" /></figure><p>Click on pull and your repository will be updated to its latest version. Now we need to pass it through the CI again. It’s easy, don’t worry.</p><p>Go to releases and you will see your site with an <strong>Update</strong> button. Since all your CI commands get saved, just click on “update” to run the CI again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MDRk6LbSlrtSYe7C8zyxlw.png" /></figure><p>With KOR, you don’t need to worry about anything other than developing a cool site.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4369eed8e3ea" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kor-framework/building-a-serverless-vue-js-landing-site-4369eed8e3ea">Building a Serverless Vue.js landing site</a> was originally published in <a href="https://medium.com/kor-framework">KOR Framework</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>