<?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 Harrish S on Medium]]></title>
        <description><![CDATA[Stories by Harrish S on Medium]]></description>
        <link>https://medium.com/@harrish?source=rss-9414405781c3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*jkHaL9ne4m76MHsV6zzaRQ.jpeg</url>
            <title>Stories by Harrish S on Medium</title>
            <link>https://medium.com/@harrish?source=rss-9414405781c3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 22:36:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@harrish/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 Two Founders Use AI Agents to Run a Fintech App]]></title>
            <link>https://harrish.medium.com/how-two-founders-use-ai-agents-to-run-a-fintech-app-0cbf929f597a?source=rss-9414405781c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/0cbf929f597a</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[openclaw]]></category>
            <category><![CDATA[ai-agents-in-action]]></category>
            <dc:creator><![CDATA[Harrish S]]></dc:creator>
            <pubDate>Sun, 08 Mar 2026 18:15:02 GMT</pubDate>
            <atom:updated>2026-03-08T18:15:02.108Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XygwrPgHYSYada6QOSldmg.png" /></figure><p>I’m Harrish and I run <a href="https://www.kiwi-money.com/">Kiwi Money</a> with my co-founder Kavishma — Sri Lanka’s first automated money manager. We have no employees, no contractors, and no office. What we do have is a squad of AI agents that handle project management, analytics, customer support, and content — all coordinated through <a href="https://openclaw.ai/">OpenClaw</a>.</p><p>This is how we set it up, how we actually use it day-to-day, and what we’ve learned.</p><h3>The Problem</h3><p>Building a product with two people means you’re always context-switching. I handle product, engineering, and finance. Kavishma handles support, design, and marketing. Between us, we need to:</p><ul><li>Track bugs, features, and experiments across Trello</li><li>Monitor app errors and crash reports daily</li><li>Analyze trial-to-paid conversion funnels</li><li>Respond to customer support emails</li><li>Plan and publish social media content</li><li>Keep each other in sync — without endless meetings</li></ul><p>We tried doing all of this manually. It didn’t scale. Bugs slipped through. Experiments ran without anyone checking results. Support emails sat for days.</p><p>So we built an AI operations team with a human-in-the-loop system.</p><h3>The Squad</h3><p>We run five AI agents on a single Hetzner server (2 vCPU, 4GB RAM, ~€4/month). Each agent has a name, a role, and its own Discord bot. We talk to them like teammates.</p><p><strong>Jarvis — Squad Lead &amp; Project Manager</strong><br>The coordinator. Jarvis manages the Trello board, creates tasks, tracks what’s blocked, and keeps both founders aligned. When I make a product decision, Jarvis logs it so Kavishma sees it too. When a task belongs to another agent, Jarvis routes it.</p><p><strong>Pool — Product Analyst</strong><br>Runs daily error audits from Axiom logs. Investigates trial cancellation patterns via RevenueCat and Mixpanel. Generates experiment reports. When we noticed trial conversions dropping, Pool dug into the data and found four critical bugs — a reward overlay that never appeared, a setup event that never fired, a paywall shown to paying users, and an SMS sync race condition.</p><p><strong>Mantis — Customer Support Triage</strong><br>Monitors incoming support tickets. Investigates issues using Firebase, Axiom, and RevenueCat before escalating. Categorizes problems (tech vs non-tech, billing, churn) and creates cards on a dedicated Support Trello board. Nothing gets lost. Mantis also handles churn — when a user cancels, it pulls their activity from Mixpanel to understand what they did (or didn’t do) in the app, then drafts a personalized win-back email based on that context.</p><p><strong>Echo — Social Media &amp; Content</strong><br>Works with Kavishma on social media posts, blog content, and website updates. Manages a Content &amp; Social Trello board with its own workflow: Ideas → In Progress → Ready for Review → Scheduled → Published.</p><p><strong>Developer — Claude Code (Human-Driven)</strong><br>This is the one area where I’m still deeply hands-on. I drive the coding sessions, review every change, and make the final calls. AI is used for code changes and PR reviews, but nothing ships without me in the loop.</p><h3>How We Actually Work</h3><h4>The Daily Flow</h4><p><strong>9am</strong> — Jarvis messages me on Discord with the daily error logs and any tech support cases that need my attention. I don’t check dashboards — the important stuff comes to me.</p><p><strong>Throughout the day</strong> — If something stands out, I can DM Jarvis to dig deeper into a specific issue. We brainstorm solutions back and forth, and once I have a fix in mind, I copy-paste it straight into Claude Code on my Mac to implement it.</p><p><strong>Experiment results</strong> — Pool sends these when I ask, or automatically when an experiment concludes — along with follow-up actions based on the data.</p><p><strong>End of day</strong> — Jarvis sends a summary of support cases I still need to attend to, so nothing slips through the cracks.</p><h4>The Routing Model</h4><p>We keep it simple. Each founder talks to the agent they need:</p><ul><li>Quick lookup or status check → DM the agent directly</li><li>New work that needs tracking → Tell Jarvis → He creates a card and routes it</li><li>Cross-team updates → Jarvis syncs both founders via Trello and memory</li></ul><p>Jarvis can message any agent. Other agents can’t message each other. This is intentional — it prevents a game of telephone between AI agents and keeps humans in the loop.</p><h4>Automated Monitoring</h4><p>Pool runs a daily cron job at 9am Sri Lanka time (Mon–Sat). It pulls error counts from Axiom, compares against baselines, and flags spikes. We don’t check dashboards anymore — if something’s wrong, Pool tells us.</p><p>Jarvis runs a heartbeat every 24 hours. It scans Trello for stuck cards, stale experiments, and unresolved blockers. If nothing needs attention, it stays silent. If something’s off, it pings the right founder.</p><h3>Real Example: Finding and Fixing a Conversion Drop</h3><p>Here’s a concrete example of the squad in action.</p><p>We noticed trial conversions were dropping. I asked Pool to investigate.</p><p>Pool pulled RevenueCat data, cross-referenced with Mixpanel events, and found:</p><ol><li><strong>Reward overlay never appeared</strong> after users verified SMS automation — 66% drop at that step</li><li><strong>Dashboard setup event never fired</strong> after SMS import on Android — 32% drop</li><li><strong>Paywall shown to active subscribers</strong> — users who already paid were seeing upgrade prompts</li><li><strong>SMS sync race condition</strong> — auth check fired before RevenueCat confirmed the trial was active</li></ol><p>Four bugs. All invisible in surface-level metrics. Pool found them by tracing the funnel step by step.</p><p>I fixed them. Jarvis created experiment cards to measure the impact. Pool is now tracking whether conversion rates recover.</p><p>That entire investigation — from “conversions are dropping” to “here are four bugs with root causes” — happened through Discord messages. No dashboards, no SQL queries, no spreadsheets.</p><p>Pool was our biggest breakthrough. Since Pool came to life, we’ve never visited the Mixpanel dashboard or Firebase console. Everything we need comes through conversation. It’s been a life saver.</p><h3>Security is Paramount</h3><p>Running AI agents with access to production data means security isn’t optional. Here’s what we’ve done:</p><p><strong>Network isolation</strong> — The server runs behind Tailscale. It’s invisible to the public internet. No open ports, no SSH from random IPs. Only devices on our private network can reach it.</p><p><strong>Sandboxed agents</strong> — Each agent runs in its own Docker container. They can only access the tools and data they need. Pool gets Axiom and Mixpanel tokens. Mantis gets Firebase and RevenueCat. Echo gets Trello. No agent has access to everything.</p><p><strong>No agent-to-agent free-for-all</strong> — Only Jarvis can message other agents. We made this decision explicitly to prevent prompt injection chains. If a compromised agent could message every other agent, one bad input could cascade. With Jarvis as the single router, there’s one point to monitor.</p><p><strong>Credentials locked down</strong> — API keys and tokens live in a single .env file with restricted permissions. Agents receive them as environment variables in their containers — they never see the raw file.</p><p><strong>Human-in-the-loop for code</strong> — No agent merges code. A human always reviews and approves.</p><p><strong>Rate limiting</strong> — The gateway has rate limits to prevent runaway API calls. If an agent goes haywire, it hits a ceiling before doing damage.</p><h3>The Stack</h3><p>For anyone who wants to replicate this:</p><ul><li><a href="https://claude.ai/"><strong>Claude</strong></a> — The thinking brain. Every agent runs on Claude — it powers the reasoning, analysis, and decision-making behind each one.</li><li><a href="https://openclaw.ai/"><strong>OpenClaw</strong></a> — The orchestration layer. Manages agents, routes messages, handles Discord/Telegram bots, runs cron jobs, and enforces security policies. Everything runs from a single config file.</li><li><strong>Discord</strong> — Each agent has its own bot. Founders DM agents directly. It’s the primary interface.</li><li><strong>Trello</strong> — Three boards: HQ (product work), Support (customer issues), Content &amp; Social (marketing). Agents create and manage cards via the API.</li><li><strong>Hetzner CX22</strong>–2 vCPU, 4GB RAM, Ubuntu. Costs about €4/month. Runs all five agents comfortably.</li><li><strong>Tailscale</strong> — Zero-config VPN for network security.</li></ul><h3>What We’ve Learned</h3><p><strong>Start with one agent, then expand.</strong> We started with just Jarvis. Once the Trello workflow was solid, we added Pool for analytics, then Mantis for support, then Echo for content. Each agent was battle-tested before the next one came online.</p><p><strong>Give agents clear boundaries.</strong> The worst thing you can do is create an “everything agent.” Each agent has a SOUL.md file that defines exactly what it does and doesn’t do. Pool doesn’t write blog posts. Echo doesn’t debug crashes. Boundaries prevent confusion and hallucination.</p><p><strong>Keep humans in the loop.</strong> Agents draft, investigate, and recommend. Humans decide, approve, and ship. Mantis doesn’t reply to customers directly — it investigates and escalates. Echo doesn’t publish posts — it drafts and waits for approval.</p><p><strong>Memory is critical.</strong> Each agent has a MEMORY.md file for long-term context — decisions, preferences, product knowledge. When I make a strategic call in my session, Jarvis writes it to memory so Kavishma’s session picks it up. Without this, the two-founder model breaks down.</p><p><strong>Security isn’t a later problem.</strong> We locked things down from day one. Sandboxing, network isolation, restricted agent communication, credential management. It takes an extra hour to set up. It saves you from a catastrophic breach later.We’re two founders building a finance app for Sri Lanka. We don’t have the budget for a team. But with OpenClaw, we have something better — a team that never sleeps, never forgets, and costs less than a coffee subscription.</p><h3>Personal Note</h3><p>We’re still learning how to integrate agents more effectively into our workflows. This is version 1. With more use of Mantis and Echo, we’ll refine the process further.</p><p>And don’t panic after reading this thinking your job is on the line. In my opinion, it’s not. Use these tools to cut the grunt work, understand problems faster, and design experiments to find solutions. The time from idea to execution can be a matter of hours now. That’s the real shift.</p><p>And to be clear — our goal isn’t to never hire people. I can never catch a beer with Jarvis or Pool. But when we’re at a point where we can afford to hire, that person is joining a team where the grunt work is already handled. They get to focus on thinking and decision-making.</p><p>Thanks for reading!!</p><p><em>Harrish is the tech co-founder of </em><a href="https://www.kiwi-money.com/"><em>Kiwi Money</em></a><em>. Follow him on </em><a href="https://x.com/h_rrish"><em>X</em></a><em> and </em><a href="https://www.linkedin.com/in/harrishs/"><em>LinkedIn</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0cbf929f597a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What RxJS really is ? Part 1]]></title>
            <link>https://engineering.corzent.com/what-rxjs-really-is-part-1-bf7fd75c6e92?source=rss-9414405781c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf7fd75c6e92</guid>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[rxjs]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[observables]]></category>
            <category><![CDATA[reactive-programming]]></category>
            <dc:creator><![CDATA[Harrish S]]></dc:creator>
            <pubDate>Mon, 26 Dec 2022 05:25:31 GMT</pubDate>
            <atom:updated>2023-02-02T03:40:18.303Z</atom:updated>
            <content:encoded><![CDATA[<h3>Complete guide to RxJS — Episode 01</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R6TUOYzz9ED6W7vSP8kf9Q.jpeg" /></figure><h3>What RxJS really is ?</h3><p>This blog will be the first part of “What RxJS really is?” series and will cover,</p><ul><li>RxJS explained in simple terms.</li><li>Why use RxJS ?</li><li>RxJS Terms and Syntax</li></ul><h3>RxJS explained in simple terms.</h3><p>“RxJS is a library for composing asynchronous and event-based programmes by using observable sequences.”</p><p>This is the explanation given by the RxJS team in the official documentation, and believe me, I did not understand a thing from this line. So let’s make things simple with an example:Let’s take the very simple example shown in the RxJS documentation. listening to click events and only logging one click per second.</p><p>The vanilla JS approach</p><p>The RxJS approach</p><pre>let count = 0;<br>let rate = 1000;<br>let lastClick = Date.now() - rate;<br>document.addEventListener(&#39;click&#39;, () =&gt; {<br>  if (Date.now() - lastClick &gt;= rate) {<br>    console.log(`Clicked ${++count} times`);<br>    lastClick = Date.now();<br>  }<br>});</pre><pre>import { fromEvent, throttleTime, scan } from &#39;rxjs&#39;;<br><br>fromEvent(document, &#39;click&#39;)<br>  .pipe(<br>    throttleTime(1000),<br>    scan((count) =&gt; count + 1, 0)<br>  )<br>  .subscribe((count) =&gt; console.log(`Clicked ${count} times`));</pre><p>As you can see, the number of lines in the logic is insane; you don’t even have to worry about checking if the last click was one second before. That is handled by the throttleTime operator.</p><p>At this point, you don’t have to know what all the operators (throttleTime and scan methods are called operators) and subscription (which will be discussed further down) are doing in the code, but it is very important to understand what and how RxJS works here. RxJS and observables act as a funnel. The event is filtered through various types, and the end result is returned. This is extremely useful for developing complex solutions to complex problems because it allows us to massively transform the data we want to use with methods.</p><p><em>pssst: “Always think of RxJS and observables as a funnel where data goes through various operators that we can define to help us transform data.”</em></p><h3>Why Use RxJS ?</h3><p>There are other ways to handle async operations, such as callbacks and promises.</p><ul><li><strong>Callbacks</strong>: A callback is a function that can be called back after an async function is complete. But callbacks can be difficult to manage when working with nested async operations.</li><li><strong>Promises</strong>: A promise is an object that may produce a single value some time in the future. It can only handle a single emission and is not cancelable.</li><li><strong>async/await</strong>: async/await is a special syntax that allows writing asynchronous code that looks synchronous. It can also only handle a single emission and is not cancelable.</li></ul><p>But RxJS</p><ul><li><strong>One technique to rule them all — it</strong> gives the ability to work with the same technique but with different data sources. (Ex: either an API call or a mouse event can both use the same technique to flow data.)</li><li><strong>Compositional</strong>: Our views often require data combined from several sources. We easily compose data with RxJS.</li><li><strong>Watchful:</strong> RxJS can produce multiple values over time and uses a push model to notify our code when specific actions occur, making it easy for us to watch and react to user interactions or data changes.</li><li><strong>Lazy:</strong> Evaluation does not start until subscription, so we can create recipes that only execute when we need the result.</li><li><strong>Errors are handled gracefully: Built in Errror handling.</strong></li><li><strong>Cancellable: We</strong> can cancel asynchronous actions. For example, if a user clicks on product A and then quickly clicks on product B, we can cancel the request for product A and only return product B.</li></ul><p><em>pssst: Be patient and read more to understand how each aspect discussed above can be used in code 😄. The key takeaway here is to understand why to use RxJS and not other async operations.</em></p><p>Before moving into RxJS terms and syntax, let’s look at two pseudo-code-level examples to understand more about how RxJS can be used to make our lives easier.</p><p>Example 1: Simple math addition.</p><pre>// code A<br>x = 5<br>y = 3<br>z = x + y<br>x = z<br><br>// z is 8</pre><p>Code A is a very basic example; we find the total of “z” and then, after the value has been assigned, we change the value of “x.” Still, “z” will be 8, right? Of course, the value assigned was 8 when the expression was first evaluated. “z” is not going to change for changes made after the expression. But what if we need to do that? What if there is a situation that requires “z” to change whenever “x” or even “y” changes?</p><pre>//code B<br>// $ var is observed for changes<br>x$ = new Observable()<br>y$ = new Observable()<br>x$ = 5<br>y$ = 3<br>z$ = combine(x$, y$).pipe(map([x,y] =&gt; x + y ));<br>x$ = 7<br><br>// z$ emits 8, then 10</pre><p>RxJS and observables enable us to listen to variable changes. When X or Y of them changes, the z$ listens for it and performs the x + y operation to calculate the total.</p><p><em>psst: You don’t have to understand what combine, pipe, or map are doing here, but the important takeaway is that RxJS allows us to react to changes and have those changes propagated.</em></p><h3>RxJS Terms and Syntax</h3><p>To establish a solid foundation in understanding RxJS, we must first thoroughly understand the terminology listed below.</p><ul><li>Observer/Subscriber</li><li>Observable</li><li>Subscribing</li><li>Unsubscribing</li><li>Creation function</li></ul><p>Let’s take the example of apples on a conveyer belt here.</p><p><em>Pssst: When looking at data streams, always think of apples coming out of a conveyor belt.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*aMX-1coey6l412ihdsROFA.png" /></figure><h3>Observer/Subscriber</h3><p>As an observer in our apple factory, you observe the apples as they are emitted by the conveyor. You will be notified as soon as the next apple arrives so that you can process it. You are notified of an error condition so you can handle it, and you are notified when there are no more apples, so you are done for the day. As its name implies, an observer is an object that observes and responds to notifications specified as methods: next to handle the next emitted item, error to handle an error condition, and complete to do any final processing or cleanup.</p><p>Definition of an Observable from the RxJS documentation:</p><p>“An Observer is a consumer of values delivered by an Observable. Observers are simply a set of callbacks, one for each type of notification delivered by the Observable: next, error , and complete&quot;.</p><p>A subscriber implements the observer interface. While observer is the class we used to observe emitted items, inside RxJS, each observer is converted to a subscriber. A subscriber is basically an observer with additional features to unsubscribe from an observable.</p><p>Let’s look at how an observer looks like in code:</p><pre>const observer = {<br>	next: apple =&gt; console.log(`Apple emmited ${apple}`),<br>	error: err =&gt; console.log(`Error occrurred: ${err}`),<br>	complete: () =&gt; console.log(`No more apples, go home`)<br>};</pre><p><em>psst: The key takeaway here is to think that an observer is an object with three methods!</em></p><h3>Observable</h3><p>An observable is a collection of events or values emitted over time. Events can come from user actions such as key presses, selections, and mouse moves, or from the application itself, such as the router or forms. Data can come from a back-end server via HTTP or internal structures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/927/0*gVu4v_QhmGjEJY2p" /></figure><p>An observable can emit any type of data, including:</p><ul><li>Primitives: numbers, strings, dates</li><li>Events: mouse, key, valueChanges, routing</li><li>Objects</li><li>Arrays</li><li>HTTP response</li><li>Another observable</li></ul><p>Observables can be:</p><ul><li>Synchronous: The items are emitted immediately and in sequence, for example, by emitting items from an existing array.</li><li>Asynchronous: The items are emitted over time, for example, if a user changes their mind about the quantity of items to buy.</li><li>Finite: emit as much as the numbers in an array.</li><li>Infinite: emit a count when a timer goes off every second forever.</li></ul><p>How an observable looks like in code ?</p><pre>const apples$ = new Observable(appleSubscriber =&gt; {<br>	appleSubscriber.next(&#39;Apple 1&#39;);<br>	appleSubscriber.next(&#39;Apple 2&#39;);<br>	appleSubscriber.complete();<br>})</pre><p>The “$” sign is used to visually indicate that this variable can be observed as it emits items. In the constructor, we optionally provide a function that’s called when the observable is subscribed. This function is given to the subscriber. Within the function, we can use that subscriber to call next to emit values, error to raise an error, or complete to provide notification that there are no more items to emit. Here, we call next to emit two apple strings and then complete.</p><p><em>psst: This is not the exact way we will be creating observables in code, but it’s best to understand the long-form syntax to build the foundation.</em></p><p>so right now we have defined an observer and observable.</p><pre>const observer = {<br>	next: apple =&gt; console.log(`Apple emmited ${apple}`),<br>	error: err =&gt; console.log(`Error occrurred: ${err}`),<br>	complete: () =&gt; console.log(`No more apples, go home`)<br>};<br><br>const apples$ = new Observable(appleSubscriber =&gt; {<br> appleSubscriber.next(&#39;Apple 1&#39;);<br> appleSubscriber.next(&#39;Apple 2&#39;);<br> appleSubscriber.complete();<br>});</pre><p>Will this code emit two apples strings? Nope. Let’s move to the next topic to know more!</p><h3>Subscribing</h3><p>In the apple factory, you start the conveyor to begin receiving emitted apples. With RxJS, we call the subscribe method on the observable to start receiving notifications and pass in the observer so the observable knows where to send those notifications to. We must subscribe to an observable. Otherwise, we receive no emissions and have nothing to observe.</p><pre>//observer<br>const observer = {<br>	next: apple =&gt; console.log(`Apple emmited ${apple}`),<br>	error: err =&gt; console.log(`Error occrurred: ${err}`),<br>	complete: () =&gt; console.log(`No more apples, go home`)<br>};<br><br>//observable<br>const apples$ = new Observable(appleSubscriber =&gt; {<br> appleSubscriber.next(&#39;Apple 1&#39;);<br> appleSubscriber.next(&#39;Apple 2&#39;);<br> appleSubscriber.complete();<br>});<br>//subscrption<br>const sub = apples$.subscribe(observer);</pre><p>We call the subscribe method on the observable like this: When we subscribe, we pass in an observer to monitor that subscription and react each time an item is emitted, when an error occurs, or when the observable completes. To put this another way, as part of the subscription process, we tell the observable how we will observe it. The subscribe method returns the subscription, which represents the execution of the observable. Now that we have subscribed, this code in the constructor is executed. It first calls next, the observer gets the next notification, and it displays the next method message in the console. It calls next again, displaying a second message in the console. Lastly, this code calls the complete method. The observer gets the complete notification and displays the complete message.</p><p>Calling this complete here cancels all the subscriptions to that observable. But what if we want to cancel a subscription directly?</p><h3>Unsubscribing</h3><p>In our apple factory, we turn off the conveyor before we leave to ensure we don’t end up with apples leaking everywhere. With RxJS, to stop receiving notifications, we call unsubscribe on the subscription returned from the subscribe method. Every time we subscribe to start receiving notifications, we should also unsubscribe to stop receiving those notifications. This avoids potential memory leaks in our applications. There are actually several ways we can stop receiving notifications from an observable. Calling the subscriber’s complete method automatically cancels all subscriptions. Some creation functions and operators automatically complete after emitting all of their items. Completion cancels all subscriptions. We’ll talk more about this shortly. Any uncaught error executes the observer’s error method and cancels all subscriptions. Once an unhandled error occurs, the observable won’t emit any more items. We can also unsubscribe from an observable to stop receiving notifications. Unsubscribing does not call the observer’s completemethod. It simply lets the observable know that we are no longer interested in observing it.</p><p><em>pssst: Recap on what we learned now:</em></p><pre>//observable - hard coded data source <br>const apples$ = new Observable(appleSubscriber =&gt; {<br>	appleSubscriber.next(&#39;Apple 1&#39;);<br>	appleSubscriber.next(&#39;Apple 2&#39;);<br>	appleSubscriber.complete();<br>});<br><br>// observer to tell the observable what to do with the emited values.<br>const observer = {<br> next: apple =&gt; console.log(`Apple emmited ${apple}`),<br> error: err =&gt; console.log(`Error occrurred: ${err}`),<br> complete: () =&gt; console.log(`No more apples, go home`)<br>};<br>//subscrption - telling that we are reeady to receieve notifications<br>const sub = apples$.subscribe(observer);<br>// unsubscribe - good practice to call unsubscribe<br>sub.unsubscribe();</pre><p>But is this really how we create our observables with a constructor? Nope. Let’s look at creation functions next.</p><h3>Creation Functions</h3><p>When using RxJS in an Angular application, we often don’t create our own observables. Rather, we work with the observables Angular creates for us. But there are times when we want to create one ourselves. We could create an observable using the observable constructor, but the recommended technique is to use the built-in creation function. Of is one such function. Of creates an observable using a set of defined values, emitting each value, and then completing. In this example, the observable emits two strings and completes. Or we can use the from creation function. from creates an observable from an array or other data structure, emitting each individual value from that structure, and then completing.</p><pre>//observable - hard coded data source <br>const apples$ = new Observable(appleSubscriber =&gt; {<br>	appleSubscriber.next(&#39;Apple 1&#39;);<br>	appleSubscriber.next(&#39;Apple 2&#39;);<br>	appleSubscriber.complete();<br>});<br><br>const apples = [&#39;Apple1&#39;, &#39;Apple2&#39;]<br>// creates an observable, emits and then completes<br>const apples$ = of(apples);<br>// output - [&#39;Apple1&#39;, &#39;Apple2&#39;]<br>// creates an observable, emits and then completes<br>const apples$ = from(apples);<br>// output - Apple1, Apple2</pre><p>Let’s try some actual code and check the console output.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fstackblitz.com%2Fedit%2Fangular-ivy-ze8jbn%3Fembed%3D1%26file%3Dsrc%252Fapp%252Fapp.component.ts&amp;display_name=StackBlitz&amp;url=https%3A%2F%2Fstackblitz.com%2Fedit%2Fangular-ivy-ze8jbn%3Ffile%3Dsrc%252Fapp%252Fapp.component.ts&amp;image=https%3A%2F%2Fsocial-img.staticblitz.com%2Fprojects%2Fangular-ivy-ze8jbn%2Fda43448333bfba5918a59890c873a4ac&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=stackblitz" width="745" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/bebc105c6ef8c7aa85138e9afa185126/href">https://medium.com/media/bebc105c6ef8c7aa85138e9afa185126/href</a></iframe><p>Click <a href="https://stackblitz.com/edit/angular-ivy-ze8jbn?file=src%2Fapp%2Fapp.component.ts">here</a> if the code preview fails to load.</p><h3>Summary</h3><ul><li>“Always think of RxJS and observables as a funnel where data goes through various operators that we can define to help us transform data.”</li><li>RxJS enables us to react to changes, and the changes are propagated.</li><li>When looking at data streams, always think of apples coming off of a conveyor belt.</li><li>Observable: A collection of events or values emitted over time.</li><li>Observer: observes notifications from the observable. Methods for processing (next(), error(), complete())</li><li>Subscriber: An observer that can unsubscribe.</li><li>Subscription — tells the observable that the subscriber is ready for notifications.</li><li>Subscription — subscription() returns a subscription.</li><li>Subscription — Use Subscription to unsubscribe.</li><li>creation functions — of, from and create an Observable using the newkeyword).</li><li>Always call unsubscribe on the subscription.</li></ul><p>Part 2 of the blog will explore more on the RxJS operators and other interesting topics under RxJS. Hola/follow me on <a href="https://twitter.com/h_rrish">Twitter</a> or <a href="https://www.linkedin.com/in/harrish-selvarajah/">LinkedIn</a> for any feedback, queries, and updates on the next article!! 😁</p><p>Merry Christmas 🎄 and a Happy New year 🎆!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf7fd75c6e92" width="1" height="1" alt=""><hr><p><a href="https://engineering.corzent.com/what-rxjs-really-is-part-1-bf7fd75c6e92">What RxJS really is ? Part 1</a> was originally published in <a href="https://engineering.corzent.com/">Corzent</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Take Your CI/CD pipeline to the Next level using Octopus Deploy]]></title>
            <link>https://harrish.medium.com/take-your-ci-cd-pipeline-to-the-next-level-using-octopus-deploy-e2494639eecf?source=rss-9414405781c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/e2494639eecf</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cicd-pipeline]]></category>
            <category><![CDATA[octopus-deploy]]></category>
            <dc:creator><![CDATA[Harrish S]]></dc:creator>
            <pubDate>Tue, 07 Jul 2020 15:51:21 GMT</pubDate>
            <atom:updated>2020-07-07T15:51:21.114Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1L6vECUAy_pHOiwmDu_5YA.jpeg" /><figcaption>Flow of the CI/CD pipeline</figcaption></figure><p>Hi everyone, hope you all are doing well and safe during this pandemic. So yeah, I have been working on setting up a deployment pipeline for my team with Octopus deploy so today let’s see how you can Deploy an AWS ECS task using containers from ECR but with a little more on What Octopus is? How the whole process works when we look at it in a bigger picture.</p><p><strong>In order to build your CD pipeline, you need some knowledge on creating CI pipelines using Jenkins and creating AWS ECS Tasks and storing docker images in AWS ECR.</strong></p><p>In this blog today we will look at;</p><ol><li><strong>What is Octopus Deploy?</strong></li><li><strong>Outline of the workflow of CI/CD</strong></li><li><strong>Setting up the Continuous Deployment pipeline</strong></li></ol><h3>1. What is Octopus Deploy?</h3><p>Before explaining what<a href="https://octopus.com/"> Octopus Deploy</a> is let me explain what <strong>Release Management is?</strong></p><p>A software team typically has many environments which they work on other than production such as dev and test so Release management is how the flow between these environments is built. Octopus deploy is a tool which helps us to build this flow.</p><p>But why Octopus Deploy? Simple, the UI/UX of the application is just dope and it’s one-stop for release management for your whole project and it supports nearly all cloud providers plus if you are a small or a medium scale team, the tool is just FREE!!</p><h3><strong>2. Outline of the workflow of CI/CD</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KYWK5VmbyfrbUGL-CtXJCw.jpeg" /></figure><p>I will be explaining the CI/CD process in this part of the section.</p><h4><strong>The Deployment pipeline</strong></h4><ol><li>Developers commit code changes to git.</li><li>The web hook is triggered so that Jenkins detects the code changes and performs the continuous integrations build, this includes resolving any dependencies and running unit tests.</li><li>next in the CI process the image is built and is tagged with an version(here we use semantic versioning) and is pushed to AWS ECR.</li><li>once the build is complete a release is created to the octopus deploy server to deploy the build to dev environment.</li><li>The QA in your team now can test the build which was deployed to dev</li><li>When the QA/team is satisfied with the release the QA/team can promote the release from dev to staging and production.</li></ol><p>This is just one way of creating a workflow for CI/CD, there numerous ways to model you CI/CD. feel free to master your own CI/CD pipeline process which suits to you team.</p><h4>Prerequisites</h4><p>There are a number of tools to implement a complete CI/CD workflow. These include git, Jenkins, Octopus Deploy server, octopus CLI, Docker, AWS account for AWS ECR and ECS.</p><p>Even though I talk about CI pipeline here, it is out of scope for this blog so I will assume you have your CI environment ready and I will be only explaining how to set up the CD pipeline.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*pfoDKzXeiI0PST_mQ-kpRA.png" /><figcaption>Tools needed for CI/CD pipeline</figcaption></figure><h4>The tools required for this tutorial</h4><p><strong>Git</strong><br>The Source code for your application need to be hosted in Bit bucket or GitHub.</p><p><strong>Jenkins<br></strong>This will be the CI environment where you build, resolve and install any dependencies, run unit tests, create docker images, version your images and publish them to AWS ECR.</p><p><strong>Docker</strong><br>The Docker cmd is need to build and push images to ECR requires dicker to be installed.</p><p><strong>AWS ECR</strong><br>Amazon Elastic Container Registry is a fully managed Docker container registry where you can store and manage docker container images. when creating a ECR I would recommend you to create an registry not in you root account but create AWS user account and create and registry there. <a href="https://aws.amazon.com/ecr/">Click </a>here to create you own registry.</p><p><strong>AWS ECS<br></strong>Amazon Elastic Container Service is a fully managed conatiner orchestration. ECS is a place where you run your containers on an EC2 instance or AWS fargate.</p><p><strong>Octopus CLI<br></strong>use the command<strong> </strong>choco install octopustools to install octopus cli in windows.</p><p><strong>Octopus deploy</strong><br><a href="https://octopus.com/downloads/server">Click </a>here to download the octopus deploy server and refer the <a href="https://octopus.com/docs/installation">docs </a>to install the server in windows.</p><p>Hope you have a clear understanding of the workflow we are going to follow so buckle up to start setting up your CD pipeline.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F8m8xQQPOZx8dMe0IJ4%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fgeorgerussell63-formula-1-one-george-russell-8m8xQQPOZx8dMe0IJ4&amp;image=https%3A%2F%2Fmedia2.giphy.com%2Fmedia%2F8m8xQQPOZx8dMe0IJ4%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/3d902ad0f0b0738df574cd84a6fe7351/href">https://medium.com/media/3d902ad0f0b0738df574cd84a6fe7351/href</a></iframe><h3>3. Setting up the Continuous Deployment pipeline</h3><p>Setting up the Continuous Deployment has 4 parts;</p><p><strong>A. Adding the ECR feed to Octopus Deploy<br>B. Creating Environments<br>C. Deploying Images to AWS ECS<br>D. Automatic Deployment to the Dev environment</strong></p><h4><strong>A. Adding the ECR feed to Octopus Deploy</strong></h4><p>Step 1: Go to the Octopus Server you have just installed.</p><p>Step 2: Go to library —&gt; External feeds</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-iHZHfBOIR89X38mcjeHyA.png" /></figure><p>You will land to a page like above.</p><p>Step 4: Click on Add Feed</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dHaBIMiGQlchDEAe6a89-w.png" /></figure><p>Select <strong>Feed type</strong> as “AWS Elastic Container Registry”<br>Give your feed a name and add your AWS account Access key, Secret key and the region where your containers are.</p><p>Step 4: Click Save and Test</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YI9qiEWl9LKynApL2UEP-g.png" /></figure><p>Search for your image repo and if shows, Great you have added the ECR feed to you octopus deploy server.</p><h4><strong>B. Creating Environments</strong></h4><p>Step 1: Go to Infrastructure and then add environments dev, staging and Production.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JXEk_VbKISz9z3vY1Z7p4Q.png" /><figcaption>Environments in Octopus Deploy</figcaption></figure><h4>C. <strong>Deploying Images to AWS ECS</strong></h4><p>Step 1: Create a Project using the ‘Add Project’ button in Projects page.</p><p>Step 2: Go to Variables</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z2hzApOvhMCTkx0lJihaag.png" /><figcaption>Project Variables</figcaption></figure><p>Add your AWS account credentials under the variable name as the account is likely to differ between dev, staging ans production so its best to give the account via a variable scoped to which environment it will be used.</p><blockquote>Tip: Not only Environment, project variables can be scoped to projects,tasks,steps and etc.</blockquote><p>Also give the name of the Cluster you created in ECS, the name of the service and the Task definition you created which we will be using in our script.</p><p>Step 3: Go to Process and Add a<em> Run an AWS CLI script</em> step to your project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZzYimOuuy8P7gamsiFZPgA.png" /><figcaption>Add Step → Click on Script and Scroll down</figcaption></figure><p>Unfortunately Octopus doesn&#39;t support a ECS specific deployment step but we can still use the AWS-cli script to update our ECS task and service.</p><p>step 5: Add the AWS Account variable in the step and the Region where your ECS is available.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/1*q7P0-v6ZOVvR8bx_n-sL7w.png" /></figure><p>Step 6: Add the package we want to refrence at execution time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*-PDeLFRe6GtfNJSLBwNSmA.png" /><figcaption>Creating Package reference</figcaption></figure><p><strong>Package feed</strong>: ECR Feed you created in <strong>A. Adding the ECR feed to Octopus Deploy.</strong></p><p><strong>Package ID</strong>: The repository name which contains the image you want to deploy in ECR</p><p><strong>Select</strong> ‘The package will not be acquired’</p><p>Step 7: Create a script to deploy the image in ECS.</p><pre>$ClusterName = $OctopusParameters[&quot;ClusterName&quot;]<br>$ServiceName = $OctopusParameters[&quot;ServiceName&quot;]<br>$TaskDefinitionArn = $OctopusParameters[&quot;TaskDefinitionArn&quot;]</pre><pre>Write-Host &quot;Updating Service $ServiceName&quot;<br>$ServiceUpdate = Update-ECSService `<br>    -Cluster $ClusterName `<br>    -ForceNewDeployment $true `<br>    -Service $ServiceName `<br>    -TaskDefinition $TaskDefinition.TaskDefinitionArn `<br>    -DesiredCount 2 `<br>    -DeploymentConfiguration_MaximumPercent 200 `<br>    -DeploymentConfiguration_MinimumHealthyPercent 100</pre><p>The Script above deploys the image to inside the service you created which is inside the Cluster.</p><p>Step 8: Creating a Lifecycle for your deployment flow</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XWvurpZq9u0mVpp3xb2jLw.png" /></figure><p>Go to Library → Lifecycles and give your cycle a name and add the phases in your cycle and create your lifecycle.</p><p>Lifecycles is the way your deployment will work. for example here its Dev → staging → Production so the flow of build would be from Dev to stagin to Production.</p><blockquote>Tip: You can customize your lifecycle by making any phase optional or require signing off before the deployment which is normally done for production.</blockquote><p>Finally as we are all set we can create our first deployment to Dev :)</p><p>Step 9: Create release</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kW3sUdJDblYFx1O19rSb9A.png" /><figcaption>Create release</figcaption></figure><p><strong>Version</strong>: The deployment version which for the first release would be 0.0.1</p><p><strong>Package</strong>: The package you are gong to release which has been got from ECR feed. This package is the latest package which has been pushed to ECR</p><h4><strong>D. Automatic Deployment to the Dev environment</strong></h4><p>This step requires in the installation of Octopus CLI in the CI server.</p><p>Step 1: Create a stage in your Jenkins script to add the Auto deployment cmd</p><pre>Octo create-release --server http://localhost --apiKey $OctopusAPIKey --project &quot;Random Quotes&quot; --progress --deployto Dev</pre><p>to break down the octopus code;<br> — server: Jenkins server URL<br> — apiKey : API key from Octopus Deploy<br> — project : Name or ID of the project<br> — package : StepName:PackageName<br> — progress : prints out the progress of the auto-deployment in the cmd<br> — deployto Dev : deploy to dev</p><p>Hooray, you have successfully built your CD pipeline and taken it to the next level !!!!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FfLs9fZN68LWa49MpUF%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fmercedesamgf1-fLs9fZN68LWa49MpUF&amp;image=https%3A%2F%2Fmedia0.giphy.com%2Fmedia%2FfLs9fZN68LWa49MpUF%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/5673c03380b5d98923201e7a6608492e/href">https://medium.com/media/5673c03380b5d98923201e7a6608492e/href</a></iframe><p>Let me know what you think on the blog in the comment section and if there’s any queries or issues don’t hesitate to ping me via <a href="https://twitter.com/h_rrish">Twitter</a>, <a href="https://www.facebook.com/selvarajahharrish">Facebook </a>or <a href="https://www.linkedin.com/in/harrish-selvarajah-a90697157/">LinkedIn</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2494639eecf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Blockchain Really Is?]]></title>
            <link>https://medium.com/thecapital/what-blockchain-really-is-3f22f5b01b85?source=rss-9414405781c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f22f5b01b85</guid>
            <category><![CDATA[blockchain-technology]]></category>
            <category><![CDATA[crypto]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Harrish S]]></dc:creator>
            <pubDate>Mon, 02 Dec 2019 05:42:00 GMT</pubDate>
            <atom:updated>2019-12-04T01:30:54.525Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x3uz5kmGy_JVgB-0_5SoMQ.png" /></figure><h4>in a non-technical perspective</h4><p>Hi everyone, hope you’re having a good day so blockchain has been a big fuzz in today’s world so what’s it all about, today let us see What blockchain really is and how it is used in a non-technical way so it’ll be more easy to understand.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jmUT7b0zcE214_Ptz0PuHA.png" /><figcaption>Image by <a href="https://pixabay.com/users/GDJ-1086657/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=3163494">Gordon Johnson</a> from <a href="https://pixabay.com/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=3163494">Pixabay</a></figcaption></figure><p>If your new to blockchain and want to know what it is, this article is for you so come on lets start together and change this world using blockchain technology.</p><h3><strong>Blockchain at a glance</strong></h3><p>The term ‘Blockchain’ reveals its definition, its a chain of blocks connected, to add on its a growing list of records which is the <strong>Block </strong>which is linked using cryptography which is the <strong>chain.</strong></p><h3>What is Blockchain?</h3><p>What most people think when they hear the word Blockchain is that Blockchain is the technology behind bitcoin.</p><p>Saying blockchain is the technology behind bitcoin is like saying, the internet is the technology behind email. It is true but does even start to explain the purpose of the internet?</p><p>Blockchain being this new fancy technology it works based on the old technique to store record, The ledger, let me explain it to with the following use case.</p><h4><strong>Scenario Zero without Blockchain involvement</strong></h4><p>Person A in Sri Lanka wants to transfer money to person B in the U.S.A.</p><p>Step 1: Person A goes to the bank in Sri Lanka and deposits money to person B account. Here the bank in Sri Lanka has a ledger where the transaction is recorded.</p><p>Step 2: The money is transferred to the bank in the U.S.A to person B. Here the bank in the U.S.A records the transaction in its ledger.</p><p>Here the money transfer involves in two ledgers and may be even more, because of many ledger entry system it creates friction which results in delays in the transfer and also the money reached will be less due to the commission by middle man.</p><h3><strong>Blockchain to the Rescue</strong></h3><p>Now rather than having more than one ledger entry, think of one huge ledger in the cloud and each block in the blockchain will have a copy of the ledger which will record transactions, so now the scenario will be;</p><p>Step 1: Person A sends bitcoins to Person B via blockchain, the transaction is verified by each block in blockchain and then the transaction added making it just one ledger entry.</p><p>This transaction has no middle man, middle man will be completely eliminated when we bring the blockchain concept alive and how? this is because the trust in the system is not centralized it&#39;s being decentralized resulting in no central authority needed.</p><p>Now, the question arises, how is blockchain managed and how is it authenticated? This will be explained in the upcoming section <strong>How Blockchain Works?</strong></p><h3>Why is Blockchain so special?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6xVwapgLK-tTK7rzMmJObA.png" /><figcaption>Image From the Friends TV Series</figcaption></figure><p>Let me explain this with the following use case;</p><p>In this use case here Phoebe, Rachael, Monica, Joey, Ross, and Chandler are having a lucky draw. Everyone here has to draw in 100 dollars and the lucky winner will win an amount of 600 dollars. so if you were one of them who will you trust with the money of-course you&#39;ll have Monica in mind but it&#39;s not how it works.</p><p>The trust here is <strong>Decentralized</strong>, there is no superwomen or men or any one in control here, you trust on all 5 of your friends on the money, the trust is <strong>distributed or Decentralized </strong>so its very hard to cheat and if you want to commit fraud here you will have to compromise most or all of them.</p><p>Here we can take the friends as nodes and money as the Cryptocurrency which brings us to Blockchain.</p><p>A BlockChain is;</p><p><strong>Decentralized: </strong>as explained above, the trust is distributed, there is no central authority so leaving it to be distributed system(Decentralized).</p><p><strong>Secure: </strong>blockchain uses the best cryptography algorithms so it very hard to hack.</p><p><strong>Provenance</strong>: The transactions happening in the blockchain are stored in nodes and are added to the chain after the last node and been constantly recorded so that they can be traced back.</p><p><strong>Immutable</strong>: Each block in the blockchain is immutably linked to the next block as in, each block has a copy of the ledger so for a hacker to change one block the hacker will have to change the whole blockchain.</p><h3><strong>How Does Blockchain work?</strong></h3><p>I will be using the example used in the section <strong>What is Blockchain?</strong></p><p>So now we know blockchain is a chain of blocks where the block which are nodes holds the transaction. When person A starts a transaction, the transaction is recorded in the ledge, in-terms of blockchain the transaction induced is a creation of a node and is validated and then added to the chain.</p><p>This validation part as to be done before adding a node into the chain. This is done through a <a href="https://whatis.techtarget.com/definition/consensus-algorithm?source=post_page-----4589971e6d03----------------------">consensus mechanism</a>. This mechanism is used to reach an agreement among the nodes.</p><p>Different cryptocurrencies use different consensus algorithms, Bitcoin and <a href="https://cointelegraph.com/tags/ethereum">Ethereum</a> use <strong>Proof Of Work(POW) </strong>algorithm which is the most famous one.</p><h4><strong>How Proof Of Work works?</strong></h4><p>When a transaction occurs, the transaction is validated in the following steps;</p><ol><li>The person who induces the transaction is checked whether he has possession of the fund to be transferred. Transaction happens is the validation passes.</li><li>The recipient is now recognized by everyone that he holds the amount of funds transferred.</li><li>The transaction inducer loses possession of that fund.</li></ol><p>Now a node is created with transaction details in it. Now, this has to be added to the blockchain. This is the place where the data miners come to play where now a mathematical problem is sent out and the miners use there own computational power to solve the mathematical problem. Whoever finishes first will add the node to the chain and get rewarded.</p><h3>How can Blockchain be used in real world?</h3><h4><strong>Scenario 1:</strong></h4><p>This is the scenario I explained in the section What is Blockchain, blockchain perfectly fits in. We can use blockchain to transfer money eliminating the middle man, unnecessary delay and charges.</p><h4><strong>Scenario 2:</strong></h4><p><strong>Implementing Blockchain into the Energy Sector. <br></strong>Producing power has not been a problem to date but making it economically available as always been a problem. There’s always where one place produces more power and one place has no power. We can connect all the houses to our blockchain and excess power areas can provide electricity to power deficit areas and power deficit areas can send cryptocurrency to the power excess area.</p><p>There are many use cases where blockchain can be added in, it’s our job to figure when, where and how?</p><h3><strong>Blockchain and the Internet</strong></h3><p>The internet solved our main problems for us such <strong>Information </strong>with google search, <strong>Distribution </strong>with Amazon and <strong>Communication </strong>with Skype and many more but it failed at two things;</p><p><strong>Trust:</strong> The information on the internet cannot be trusted, fake news, fake profiles and much more.</p><p><strong>Disintermediation</strong>: The rise of middle man, the internet promised that it’ll make a small man come up but it did not for example Uber. Uber being a taxi hail service doesn’t act peer to peer, we go through uber rather than going straight to the driver. The price Uber says charges the driver as to take and also a commission is taken by Uber.</p><p>This can be eliminated when using Blockchain.</p><blockquote>“Blockchain is the answer, Now tell me the question”</blockquote><p>And that’s a wind, I’ll end this blog with a quote which may be true, may be not. Let me know your thoughts in the comment section until then Till Next Time.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FBoHCeLmEKytt7oFxyR%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Ftiktok-bye-positive-dj-khaled-BoHCeLmEKytt7oFxyR&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FBoHCeLmEKytt7oFxyR%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="348" frameborder="0" scrolling="no"><a href="https://medium.com/media/42174374f1fee23741c6fd79a2a9f5b3/href">https://medium.com/media/42174374f1fee23741c6fd79a2a9f5b3/href</a></iframe><p><a href="https://twitter.com/Alt__Magazine">Altcoin Magazine</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2F3c1144%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2F3c1144%2F&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/4b37fd61c8660dc2cbfe8232dfa683e2/href">https://medium.com/media/4b37fd61c8660dc2cbfe8232dfa683e2/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f22f5b01b85" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thecapital/what-blockchain-really-is-3f22f5b01b85">What Blockchain Really Is?</a> was originally published in <a href="https://medium.com/thecapital">The Capital</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Static hosting Angular project in azure blob storage with Azure DevOps integration]]></title>
            <link>https://harrish.medium.com/static-hosting-angular-project-in-azure-blob-storage-with-azure-devops-integration-ce73bd6a51b9?source=rss-9414405781c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce73bd6a51b9</guid>
            <category><![CDATA[blob-storage]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[azure-devops]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Harrish S]]></dc:creator>
            <pubDate>Tue, 19 Nov 2019 10:32:27 GMT</pubDate>
            <atom:updated>2019-11-19T10:32:27.489Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*xbs_F7plGywpwRXqwN78hg.jpeg" /></figure><p>Hello everyone, I have been working with Azure for the past couples of days so thought a blog would help for the beginners who need to jump to cloud storage especially azure blob.</p><p><strong>This blog has two parts;<br>A. Static hosting your angular app into azure blob storage<br>B. Adding CI/CD with Azure DevOps to your Angular app</strong></p><h3>A. Static hosting your angular app into azure blob storage</h3><p>This part requires you to have a simple angular application which if you don&#39;t, please <a href="https://cli.angular.io/">Click here</a>.</p><p><strong>a. Prepare Azure storage to host your static site<br>Step 1</strong>: Create your free account by logging into the Azure portal and click on the storage account.</p><p><strong>step 2</strong>: Click on add and you will see the following setting</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/1*d3QlcmrrN3ENoKwNQ4yGBQ.png" /></figure><p><strong>Resource group</strong>: need to be created by you by clicking on create new</p><p>If you&#39;ve been thinking why <strong>Access tier</strong> as been set to <strong>Hot</strong>, find your answer below;</p><ul><li><strong>Hot</strong> — Optimized for storing data that is accessed frequently.</li><li><strong>Cool</strong> — Optimized for storing data that is infrequently accessed and stored for at least 30 days.</li></ul><p><strong>step 3</strong>: Click on <strong>Review + create</strong> and Create on the page following this.</p><p><strong>step 4</strong>: You will be directed to a page where deployment completed message is shown, click on <strong>Go to resource</strong></p><p><strong>step 5</strong>: click on the <strong>static website</strong></p><p><strong>step 6</strong>: Enable feature static website and add <strong>index.html </strong>to index document name and a <strong>404.html</strong> to error document path and click save.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D6HQNtx4tpAnAAp_11j69A.png" /></figure><p>okay Great, we have completed creating blob storage and a static site to host our application. Next will be uploading our <strong>distribution folder(dist)</strong> to the blob storage.</p><p><strong>b. Uploading angular project files to azure blob<br>Step 1</strong>: Go to your vs code where you’ve opened your project and install the extension <strong>Azure storage</strong></p><p><strong>step 2</strong>: Build you angular project using ng build --prod --build-optimizer , this creates the distribution folder(dist), this folder is used to deploy to the blob storage.</p><p><strong>step 3</strong>: Click on the Azure logo on your left</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/328/1*R2k4x3M3MlTACN3gr881gw.png" /></figure><p>Click on the <strong>blue arrow</strong> to upload the dist folder to the blob storage and this may take a while. Once Completed the site url is shown with the success message which will now have your angular app loaded.</p><p>You have done a great job, we have successfully hosted our first angular app to azure blob storage and now that&#39;s great work give your self a hug!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F1d45DdSLGl2tHNVELB%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fredbullracing-drink-celebrate-1d45DdSLGl2tHNVELB&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F1d45DdSLGl2tHNVELB%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/93654f30ba3b09276d2dcfe02a1e6291/href">https://medium.com/media/93654f30ba3b09276d2dcfe02a1e6291/href</a></iframe><h3><strong>B. Adding CI/CD with Azure DevOps to your Angular app</strong></h3><p>For this section, you will have to move to <strong>Azure DevOps</strong> with your Microsoft account you created and uploaded the angular app.</p><p><strong>Step 1</strong>: Click on <strong>pipelines</strong> and click on new to create a <strong>new build pipeline</strong>.</p><p><strong>Step 2</strong>: click on the <strong>use the classic editor</strong> and select the source where your code is. I will be going with <strong>GitHub</strong> as my source.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V-T68lmg5yfX-xdRYliPYA.png" /></figure><p>above you can see I have connected my GitHub and selected the repo and the default branch to build.<br>Click on <strong>Continue</strong></p><p><strong>Step 3</strong>: Select <strong>Node.js with Grunt</strong> and <strong>apply </strong>it as your template for the build job.</p><p><strong>Step 4</strong>: Click on<strong> npm install</strong> and fill in the Working folder that contains <strong>package.json</strong>, normally that&#39;s your project folder.</p><p><strong>Step 5</strong>: <strong>Right-click </strong>on <strong>npm install</strong> and <strong>clone </strong>the task</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SgU4npU7WLGmDgZ_RkC3-A.png" /></figure><p>Fill in as above, this command will be used to build the project in prod mode.</p><p><strong>step 6</strong>: Remove <strong>Run Grunt task</strong> and <strong>Archive files</strong></p><p><strong>step 7</strong>: Go to <strong>Publish artifacts: drop</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QXDyCHMSrGnySijFyn6lww.png" /></figure><p>Fill in the details accordingly</p><p>The azure-project in my example is the project folder I have in the git repo</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/530/1*hNUnkNXfE6hJl63BoBclWw.png" /></figure><p>This to make things easier and simple for you to understand.</p><p><strong>Step 8</strong>: click on add <strong>next </strong>to agent job and add copy files task</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7bllRLxsIGiFRyQVfC88gg.png" /></figure><p>click on <strong>Triggers </strong>and enable <strong>continuous integration.</strong></p><p><strong>Step 9</strong>: Click on <strong>save &amp; queue</strong> and then <strong>save &amp; run</strong> which will bring you to the console section where your project will build and run.</p><p>Now u have successfully created your build pipeline, next let us have a look at how to create a release with CI.</p><p><strong>Step 10</strong>: Click on add new</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/813/1*dh4LN1WZQ7vtFFyeaAE2oA.png" /></figure><p>Next click on <strong>add artifact</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*nbEWnT_QmexQABA7jLrZSA.png" /></figure><p>Here add the source which is the build pipeline previously and click on Add.</p><p><strong>Step 11</strong>: Click on add on stages which will open a column to select a template, select Empty job.</p><p><strong>Step 12</strong>: Click on the 1 job below your stage and click add next to agent job.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LWcR3xaBTdco4XN2dpRXpQ.png" /></figure><p>Search for blob and add <strong>Azure file copy.</strong></p><p><strong>Step 13</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PLYoWKHaeRrRBOaRwjtuAw.png" /></figure><p>Fill the fields accordingly and click save.</p><p><strong>Step 14</strong>: Click on create release which will release the current pipeline build we have.</p><p><strong>Step 15</strong>: Adding CD to the release pipeline</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*2yuofbBvpEaqAzh_00xkRw.png" /></figure><p>Click in the thunder sign, and enable the <strong>Continuous deployment trigger.</strong></p><p>and that&#39;s it, every time to commit changes the app will get built and released and all that happens with just git push!</p><p>Awesome we have come to end, u have done some great amount of work there so give hug yourself and this time also high five!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FBgWGTu2TgdP44%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fdance-rap-rave-BgWGTu2TgdP44&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FBgWGTu2TgdP44%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/8be686324617951179535050bd64239e/href">https://medium.com/media/8be686324617951179535050bd64239e/href</a></iframe><h3>Extra :</h3><p><strong>Why use Azure storage instead of Azure app service?</strong></p><p>Azure blob storage is much cheaper than app service, if you check the hosting cost for Azure storage with 1GB of static flies and with a total bandwidth of 10Gb/month, the total monthly hosting cost will be about $0.46USD.</p><p><strong>Problem I came across while hosting:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5OhDMJWYM1b4nakDPT9PFg.png" /></figure><p>If you ever come across this error, this is because the account you are using is owned by the organization you are working for, you will have to get permission from your administrator, as this was for a learning purpose i created an Azure account with my own outlook account.</p><p>and that’s a windup, see you all in my next blog :)</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FdhsHhobf6BZfNd8Qcl%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fmercedesamgf1-f1-formula-1-one-dhsHhobf6BZfNd8Qcl&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FdhsHhobf6BZfNd8Qcl%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="543" frameborder="0" scrolling="no"><a href="https://medium.com/media/91c9c79d6849cfe5eb12cdb1560f84c7/href">https://medium.com/media/91c9c79d6849cfe5eb12cdb1560f84c7/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce73bd6a51b9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying ml python flask app to Heroku using Pipenv]]></title>
            <link>https://harrish.medium.com/deploying-ml-python-flask-app-to-heroku-using-pipenv-988c32c9990?source=rss-9414405781c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/988c32c9990</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[pipenv]]></category>
            <category><![CDATA[heroku]]></category>
            <category><![CDATA[machinelerning]]></category>
            <dc:creator><![CDATA[Harrish S]]></dc:creator>
            <pubDate>Thu, 23 May 2019 05:45:16 GMT</pubDate>
            <atom:updated>2019-05-23T05:45:16.388Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*BkLhZ0WrXPhYEqX-nmMZcg.png" /><figcaption>Heroku Logo</figcaption></figure><p>Hello everyone, I have been working on a machine learning project for few months now and I hosted it and met a few difficulties, so with experience i got from it, I wanted to share them with the machine learning enthusiast struggling to deploy there models.</p><h4><strong>So lets get started</strong></h4><p>First question for beginners would be, why should i deploy because already flask api is running on local host:5000 or the preferred local host you have. Having local host is not a problem unless you want to make your app in a big scale or you work on a project where your work mates work on different computers. Local host will not help at these situations because its just one pc it runs on and you can’t carry your pc where ever you go. So here’s the solution you deploy the flask api where you get a public URL which can be viewed and worked on form anywhere.</p><p>Before continuing, this is not a article for beginners as it requires you to have the flask api and sound knowledge on git.</p><p><strong>Setting up your work folder to deploy</strong></p><p>As you all have already made a main.py file which contains the flask api, now it is time to get the dependencies you need. set up command prompt activating the environment you set up and you run your code on(this can be pip or conda).</p><pre>pip install pipenv</pre><p>The above line of code, is the first thing you have to do, this installs Pipenv and its dependencies.</p><pre>pipenv install</pre><p>The above line of code instantiates the Pipenv. This will create two new files, <strong>Pipfile </strong>and <strong>Pipfile.lock</strong> in your project directory and a new virtual environment for your project if it doesn’t exist already.</p><p><a href="https://github.com/pypa/pipfile">Pipfiles</a> contain information about the dependencies of your project, and supercede the requirements.txt file that is typically used in Python projects. If you’ve initiated <a href="http://docs.pipenv.org/">Pipenv</a> in a project with an existing requirements.txt file, you should install all the packages listed in that file using <a href="http://docs.pipenv.org/">Pipenv</a>, before removing it from the project.</p><pre>pipenv install &quot;dependency&quot;</pre><p>This is to install any python package into our project.</p><pre>pipenv lock</pre><p>The package name with its version can be frozen by updating the Pipfile.lock using the above line of code.</p><p>Your Pipfile and Pipfile.lock will look something similar to this,</p><p><strong>Exmaple Pipfile</strong></p><pre>[[source]]<br>url = &quot;https://pypi.python.org/simple&quot;<br>verify_ssl = true<br>name = &quot;pypi&quot;<br><br>[packages]<br>requests = &quot;*&quot;<br><br><br>[dev-packages]<br>pytest = &quot;*&quot;</pre><p><strong>Exmaple Pipfile.lock</strong></p><pre>{<br>    &quot;_meta&quot;: {<br>        &quot;hash&quot;: {<br>            &quot;sha256&quot;: &quot;8d14434df45e0ef884d6c3f6e8048ba72335637a8631cc44792f52fd20b6f97a&quot;<br>        },<br>        &quot;host-environment-markers&quot;: {<br>            &quot;implementation_name&quot;: &quot;cpython&quot;,<br>            &quot;implementation_version&quot;: &quot;3.6.1&quot;,<br>            &quot;os_name&quot;: &quot;posix&quot;,<br>            &quot;platform_machine&quot;: &quot;x86_64&quot;,<br>            &quot;platform_python_implementation&quot;: &quot;CPython&quot;,<br>            &quot;platform_release&quot;: &quot;16.7.0&quot;,<br>            &quot;platform_system&quot;: &quot;Darwin&quot;,<br>            &quot;platform_version&quot;: &quot;Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64&quot;,<br>            &quot;python_full_version&quot;: &quot;3.6.1&quot;,<br>            &quot;python_version&quot;: &quot;3.6&quot;,<br>            &quot;sys_platform&quot;: &quot;darwin&quot;<br>        },<br>        &quot;pipfile-spec&quot;: 5,<br>        &quot;requires&quot;: {},<br>        &quot;sources&quot;: [<br>            {<br>                &quot;name&quot;: &quot;pypi&quot;,<br>                &quot;url&quot;: &quot;https://pypi.python.org/simple&quot;,<br>                &quot;verify_ssl&quot;: true<br>            }<br>        ]<br>    },<br>    &quot;default&quot;: {<br>        &quot;certifi&quot;: {<br>            &quot;hashes&quot;: [<br>                &quot;sha256:54a07c09c586b0e4c619f02a5e94e36619da8e2b053e20f594348c0611803704&quot;,<br>                &quot;sha256:40523d2efb60523e113b44602298f0960e900388cf3bb6043f645cf57ea9e3f5&quot;<br>            ],<br>            &quot;version&quot;: &quot;==2017.7.27.1&quot;<br>        },<br>        &quot;chardet&quot;: {<br>            &quot;hashes&quot;: [<br>                &quot;sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691&quot;,<br>                &quot;sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae&quot;<br>            ],<br>            &quot;version&quot;: &quot;==3.0.4&quot;<br>        },<br>        &quot;idna&quot;: {<br>            &quot;hashes&quot;: [<br>                &quot;sha256:8c7309c718f94b3a625cb648ace320157ad16ff131ae0af362c9f21b80ef6ec4&quot;,<br>                &quot;sha256:2c6a5de3089009e3da7c5dde64a141dbc8551d5b7f6cf4ed7c2568d0cc520a8f&quot;<br>            ],<br>            &quot;version&quot;: &quot;==2.6&quot;<br>        },<br>        &quot;requests&quot;: {<br>            &quot;hashes&quot;: [<br>                &quot;sha256:6a1b267aa90cac58ac3a765d067950e7dbbf75b1da07e895d1f594193a40a38b&quot;,<br>                &quot;sha256:9c443e7324ba5b85070c4a818ade28bfabedf16ea10206da1132edaa6dda237e&quot;<br>            ],<br>            &quot;version&quot;: &quot;==2.18.4&quot;<br>        },<br>        &quot;urllib3&quot;: {<br>            &quot;hashes&quot;: [<br>                &quot;sha256:06330f386d6e4b195fbfc736b297f58c5a892e4440e54d294d7004e3a9bbea1b&quot;,<br>                &quot;sha256:cc44da8e1145637334317feebd728bd869a35285b93cbb4cca2577da7e62db4f&quot;<br>            ],<br>            &quot;version&quot;: &quot;==1.22&quot;<br>        }<br>    },<br>    &quot;develop&quot;: {<br>        &quot;py&quot;: {<br>            &quot;hashes&quot;: [<br>                &quot;sha256:2ccb79b01769d99115aa600d7eed99f524bf752bba8f041dc1c184853514655a&quot;,<br>                &quot;sha256:0f2d585d22050e90c7d293b6451c83db097df77871974d90efd5a30dc12fcde3&quot;<br>            ],<br>            &quot;version&quot;: &quot;==1.4.34&quot;<br>        },<br>        &quot;pytest&quot;: {<br>            &quot;hashes&quot;: [<br>                &quot;sha256:b84f554f8ddc23add65c411bf112b2d88e2489fd45f753b1cae5936358bdf314&quot;,<br>                &quot;sha256:f46e49e0340a532764991c498244a60e3a37d7424a532b3ff1a6a7653f1a403a&quot;<br>            ],<br>            &quot;version&quot;: &quot;==3.2.2&quot;<br>        }<br>    }<br>}</pre><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F3orifdlNlrBkDCXTFe%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fseason-12-the-simpsons-12x18-3orifdlNlrBkDCXTFe&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F3orifdlNlrBkDCXTFe%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="326" frameborder="0" scrolling="no"><a href="https://medium.com/media/57842c464c25d1fd9cd389f9a9b65480/href">https://medium.com/media/57842c464c25d1fd9cd389f9a9b65480/href</a></iframe><p><strong>Adding a Procfile</strong></p><p>In order to successfully get your project deployed to Heroku, a procfile is needed.</p><pre>pipenv install gunicorn</pre><p>Update the pipfile and pipfile.lock</p><pre>pipenv lock</pre><p>Create a file with the name procfile and do not add any extension to it.</p><pre>web: gunicorn app:app</pre><p>Procfile play a important role as heroku to start the web server looks upon the procfile to look at the specified module and the application name. In app:app app is the our main class(main.py).</p><p><strong>Heroku</strong></p><p>Create a new git repo and push your code with the Pipfile and Pipfile.lock. Now its time to Create a Heroku account and link your git hub account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PFyxkiuJdbUvc7oYXZIwNQ.png" /><figcaption>Creating your new web app</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LWnAXyFHRJ0eqQ3CnI8Aow.png" /><figcaption>Connect your github with the repo</figcaption></figure><p><strong>Deployment</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2kqRaDYS6uNVux1EY--ehg.png" /><figcaption>Deployment</figcaption></figure><p>The automatic deployment is wonderful, whenever you change your code and push it to git hub, Heroku recognizes it and refreshes the deployed server. Clicking on Deploy branch will deploy your server immediately.</p><p>Congratulations, you have successfully deployed your first Heroku web server!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fl2RsBhyCSu5Y5XU3Zf%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fregalmovies-regal-loveregal-captainmarvel-l2RsBhyCSu5Y5XU3Zf&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fl2RsBhyCSu5Y5XU3Zf%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/b80703b0cf7efc9dc131cf709a526990/href">https://medium.com/media/b80703b0cf7efc9dc131cf709a526990/href</a></iframe><p>For more details on Pipenv:</p><ul><li><a href="https://docs.pipenv.org/en/latest/basics/">Basic Usage of Pipenv - pipenv 2018.11.27.dev0 documentation</a></li><li><a href="https://thoughtbot.com/blog/how-to-manage-your-python-projects-with-pipenv">How to manage your Python projects with Pipenv</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=988c32c9990" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>