<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: sige</title>
    <description>The latest articles on DEV Community by sige (@sige).</description>
    <link>https://dev.to/sige</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F156235%2F4a8fd000-25cc-4200-9d5f-4c12cf2f3c5a.jpeg</url>
      <title>DEV Community: sige</title>
      <link>https://dev.to/sige</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sige"/>
    <language>en</language>
    <item>
      <title>What can European SaaS companies do after EU-US Privacy Shield invalidation?</title>
      <dc:creator>sige</dc:creator>
      <pubDate>Thu, 24 Dec 2020 14:05:15 +0000</pubDate>
      <link>https://dev.to/configcat/what-can-european-saas-companies-do-after-eu-us-privacy-shield-invalidation-mo1</link>
      <guid>https://dev.to/configcat/what-can-european-saas-companies-do-after-eu-us-privacy-shield-invalidation-mo1</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fc7shtl04p8f1buxazl4l.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fc7shtl04p8f1buxazl4l.jpg" alt="Privacy"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There is not much hype around this topic however, I believe it is very important for EU businesses today.&lt;/p&gt;

&lt;p&gt;The European Court of Justice declared the &lt;a href="https://dev.toEU%20Court%20of%20Justice%20official%20press%20release%20on%20the%20Schrems%20II%20ruling"&gt;EU-US Privacy Shield to be ineffective&lt;/a&gt; due to the FISA 702 regulations in the United States. This basically means that US authorities can execute targeted surveillance on non-US citizens and companies. They can collect, keep, and use this data for investigation. This regulation does not affect US citizens and businesses.&lt;/p&gt;

&lt;p&gt;Our company &lt;a href="//configcat.com"&gt;ConfigCat.com&lt;/a&gt; serves feature flags and is the sub-contractor of other companies as part of the supplier chain. Some of our European customers started to worry about if their data is safe with their sub-contractors and how does this affect GDPR.&lt;/p&gt;

&lt;p&gt;Being a Europen SaaS company with a global user base we looked into how we can handle this quickly with minimal user impact both technically and legally.&lt;/p&gt;

&lt;p&gt;If you are facing or faced similar issues, I'd like to hear your thoughts about it. Do you think we are going to face an increasing number of privacy issues in the future due?&lt;/p&gt;

&lt;p&gt;Here is what we did:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Implemented a Data Governance feature in ConfigCat, so customers can decide if they want their data distributed globally or only in the EU based CDN nodes. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reviewed all our own sub-contractors swapping the US ones who fall under the FISA 702 regulations.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'm personally having a bit of anxiety about where this is going. Ideally, every entity should be able to use any service no matter where they are located without being worried about the safety of their data. Maybe I'm just too idealistic.&lt;/p&gt;

&lt;p&gt;Our blog post on the topic: &lt;a href="https://configcat.com/blog/2020/11/28/eu-us-privacy-shield" rel="noopener noreferrer"&gt;https://configcat.com/blog/2020/11/28/eu-us-privacy-shield&lt;/a&gt;&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>privacy</category>
      <category>gdpr</category>
      <category>politics</category>
    </item>
    <item>
      <title>Releasing new features to a small audience first using feature flags</title>
      <dc:creator>sige</dc:creator>
      <pubDate>Thu, 14 Nov 2019 14:10:12 +0000</pubDate>
      <link>https://dev.to/configcat/releasing-new-features-to-a-small-audience-first-using-feature-flags-4e5n</link>
      <guid>https://dev.to/configcat/releasing-new-features-to-a-small-audience-first-using-feature-flags-4e5n</guid>
      <description>&lt;p&gt;Do you have a product with a consistent user base and you are releasing &lt;strong&gt;new features&lt;/strong&gt;? Then you need to decide whether it’s enough to just test these features in- house. This decision is always tricky, because sometimes it really is useful to receive feedback from a wider audience without the risk of imposing the new feature on your more important or so-called “sensitive users” (major companies that were pleased with your facilities and services up to the present, and you cannot risk the collaboration with them).&lt;/p&gt;

&lt;p&gt;If you are facing this dilemma, &lt;a href="https://configcat.com" rel="noopener noreferrer"&gt;ConfigCat&lt;/a&gt;‘s feature flags for targeting might provide you with a solution.&lt;/p&gt;

&lt;p&gt;Let’s say you have a product like Instagram, and the company decided to add new poll-boxes, quiz types and options for embedding links in the stories while removing some of the older ones.&lt;/p&gt;

&lt;p&gt;Using feature flags you will have the opportunity to enable certain features to certain group of users. Let’s say you would like to enable a feature only for the users within your company or only to a small percentage of your users (maybe in one country only) before releasing it to the entire world. In addition, you might want to exclude big companies, like H&amp;amp;M or Victoria’s Secret until you have received the favourable feedback from your employees, “friendly users” and a small percentage of app-users or even users from a selected area (country).&lt;/p&gt;

&lt;p&gt;Even though in this article it’s exemplified with &lt;a href="https://configcat.com" rel="noopener noreferrer"&gt;ConfigCat&lt;/a&gt;, targeting works just fine with other feature flag tools as well — for example with &lt;a href="https://www.unleash-hosted.com" rel="noopener noreferrer"&gt;Unleash-hosted&lt;/a&gt;. The process of targeting special users goes down in the following way:&lt;/p&gt;

&lt;p&gt;First step: you need to enable the feature:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Log in to access the Management Console&lt;/li&gt;
&lt;li&gt;Go to &lt;strong&gt;Feature Flags &amp;amp; Settings&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;TARGET SPECIFIC USERS&lt;/strong&gt; after clicking the actions icon&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fafucpl8pnipkaje4gcis.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fafucpl8pnipkaje4gcis.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After you turned on the feature flag, you will be able to target specific users.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F0iiulp7py57pif3o4crv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F0iiulp7py57pif3o4crv.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How does the targeting rule work?
&lt;/h3&gt;

&lt;p&gt;By adding a rule you can specify a group of your users whom a new feature will be enabled or a different value will be served. A rule consists of an &lt;strong&gt;Attribute&lt;/strong&gt; of a user in your application, a &lt;strong&gt;Comparison value&lt;/strong&gt; (e.g. a list of email addresses) and a &lt;strong&gt;Comparator&lt;/strong&gt;. &lt;a href="https://configcat.com" rel="noopener noreferrer"&gt;ConfigCat&lt;/a&gt; evaluates the targeting rule every time your application requires and decides what value to serve.&lt;/p&gt;

&lt;p&gt;A property of the user is considered as an &lt;strong&gt;attribute&lt;/strong&gt;, and it can vary between e-mail address, country, and identifier or custom (you can add highly specific attributes such as eye colour).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F4lz7rmut2orl838vk2ec.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F4lz7rmut2orl838vk2ec.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;comparison value&lt;/strong&gt; is any string, number or comma separated list to be compared with the selected attribute using the &lt;strong&gt;comparator&lt;/strong&gt;. It can be a list of e-mail addresses, companies or users in a specific country.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;comparator&lt;/strong&gt; has four different setting options and it marks the selection of the users with a specific attribute from the list (comparison value).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fp8cxa3yi5c6dyxka6tbs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fp8cxa3yi5c6dyxka6tbs.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fzgeantwef41hztoj3gqi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fzgeantwef41hztoj3gqi.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The term &lt;strong&gt;‘served value’&lt;/strong&gt; mentioned before refers to the exact value that will be served to the users that fall into that fraction. Depending on the kind of your setting this could be:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F12s93x592fftfqkcoj9e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F12s93x592fftfqkcoj9e.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In our example the On/Off Toggle is relevant because that is the usual state of a feature flag, but &lt;a href="https://configcat.com" rel="noopener noreferrer"&gt;ConfigCat&lt;/a&gt; offers a range of different setting kinds and types.&lt;/p&gt;

&lt;p&gt;You actually have multiple options in choosing the served value of the feature flag, for example, it can be the On/Off Toggle presented above (note: here the number of options must be 2), but if you decide to use Text and/or Number the maximum number of your options entirely depends on your subscription plan. You can add/remove options by clicking the Actions icon.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fkbjtctnv0sm08ztw4cp0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fkbjtctnv0sm08ztw4cp0.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you’ve enabled your feature for the list of your employees for instance, you can add multiple targeting rules and ordering by clicking on the Actions icon; thus you can create more complex rule sets.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Rule sets are evaluated one by one, &lt;strong&gt;from top to bottom direction&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Change the order of targeting rules by &lt;strong&gt;drag n’ drop&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Example&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Enable a feature only to users within your company except the PR team (Connor and Natasha) by adding two targeting rules:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fxfj4jpeddcpy2g2nxxmx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fxfj4jpeddcpy2g2nxxmx.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To all other uses serve: OFF&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fsawqu4lrbh2yiagfeopd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fsawqu4lrbh2yiagfeopd.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This value will be served as a fall-back if none of the above rules apply or a User Object was not passed to the &lt;a href="https://configcat.com/docs/sdk-reference/overview" rel="noopener noreferrer"&gt;ConfigCat&lt;/a&gt; correctly within your application.&lt;/p&gt;

&lt;p&gt;You can also target a &lt;strong&gt;percentage of users&lt;/strong&gt;. If you enable a new feature on a platform like Instagram, you might want to be granted public feedback by including a randomly selected fraction of your users whom a feature will be enabled, or a different value will be served. The sum of all % values must be equal to 100.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Select &lt;strong&gt;TARGET % OF USERS&lt;/strong&gt; after clicking the actions icon.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ffyr6ux9mlga2ux29swut.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ffyr6ux9mlga2ux29swut.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To sum up, targeting can prove to be great help in &lt;strong&gt;experimenting with new features&lt;/strong&gt; while offering you and your company a risk-free path to gather feedback from the targeted users. Feature flags provide you with &lt;strong&gt;a safe environment&lt;/strong&gt; with the option of changing your mind.&lt;/p&gt;

</description>
      <category>featureflags</category>
      <category>deployment</category>
      <category>targeting</category>
      <category>segmentation</category>
    </item>
    <item>
      <title>How do you recruit for user tests?</title>
      <dc:creator>sige</dc:creator>
      <pubDate>Mon, 09 Sep 2019 10:22:50 +0000</pubDate>
      <link>https://dev.to/configcat/how-do-you-recruit-for-user-tests-mc6</link>
      <guid>https://dev.to/configcat/how-do-you-recruit-for-user-tests-mc6</guid>
      <description>&lt;p&gt;I feel I got lost in the maze of Google searches filled with advertisers and self marketing articles. Seems quite hard to find authentic information about user testing.&lt;/p&gt;

&lt;p&gt;Where do you guys usually recruit subjects for user tests?&lt;/p&gt;

&lt;p&gt;I'd like to test my service on 3-5 software developers with a few years of experience. I believe my needs aren't that extraordinary.&lt;/p&gt;

&lt;p&gt;Do you guys offer money or a subscription to your service in return?&lt;/p&gt;

&lt;p&gt;Thanks for the help. I'm a little clueless here.&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>testing</category>
      <category>usertest</category>
      <category>startup</category>
    </item>
    <item>
      <title>Playing around on CodePen I have created a simple HTML page with dynamically updating content based on feature flags</title>
      <dc:creator>sige</dc:creator>
      <pubDate>Sun, 08 Sep 2019 23:51:17 +0000</pubDate>
      <link>https://dev.to/configcat/playing-around-on-codepen-i-have-created-a-simple-html-page-with-dynamically-updating-content-based-on-feature-flags-4596</link>
      <guid>https://dev.to/configcat/playing-around-on-codepen-i-have-created-a-simple-html-page-with-dynamically-updating-content-based-on-feature-flags-4596</guid>
      <description>&lt;p&gt;This Pen demonstrates how to update a page content dynamically using ConfigCat feature flags.&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/configcat/embed/pozaLLV?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>codepen</category>
    </item>
    <item>
      <title>Complete guide to build a Slack Chatbot in 7 minutes and host it for free</title>
      <dc:creator>sige</dc:creator>
      <pubDate>Fri, 06 Sep 2019 22:27:35 +0000</pubDate>
      <link>https://dev.to/configcat/complete-guide-to-build-a-slack-chatbot-in-7-minutes-and-host-it-for-free-1ef8</link>
      <guid>https://dev.to/configcat/complete-guide-to-build-a-slack-chatbot-in-7-minutes-and-host-it-for-free-1ef8</guid>
      <description>&lt;h4&gt;
  
  
  Based on GitHub's Hubot. Connected to Slack. Deployed to Heroku.
&lt;/h4&gt;

&lt;p&gt;I have a thing for robots and wanted to build a chatbot as an experiment that calls my service's (&lt;a href="https://configcat.com" rel="noopener noreferrer"&gt;ConfigCat.com&lt;/a&gt;) &lt;code&gt;\health&lt;/code&gt; endpoint and returns if everything is okay. It took me quite a long time to go trough the possible frameworks and docs, read all the outdated guides to find the quickest and cheapest way. I feel like it might worth sharing.&lt;/p&gt;

&lt;p&gt;The tools needed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://nodejs.org" rel="noopener noreferrer"&gt;Node.js&lt;/a&gt; installed&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://slack.com" rel="noopener noreferrer"&gt;Slack&lt;/a&gt; workspace&lt;/li&gt;
&lt;li&gt;Free &lt;a href="https://www.heroku.com" rel="noopener noreferrer"&gt;Heroku&lt;/a&gt; account&lt;/li&gt;
&lt;li&gt;Preferred code editor&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Adding Hubot integration to your Slack Workspace
&lt;/h1&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://configcat.slack.com/apps/A0F7XDU93-hubot" rel="noopener noreferrer"&gt;Find Hubot in Slack App Directory&lt;/a&gt;
&lt;/h4&gt;

&lt;h4&gt;
  
  
  Connect to Workspace
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fr8exqwybhdhjp97o4tdd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fr8exqwybhdhjp97o4tdd.png" alt="connect"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fh017kdh2gbilt2mdr7ce.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fh017kdh2gbilt2mdr7ce.png" alt="name"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Take a note of the API Token, you'll need it later
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fnffhcil1vwn6y8kqxcw4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fnffhcil1vwn6y8kqxcw4.png" alt="token"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Running Hubot on local machine
&lt;/h1&gt;

&lt;h4&gt;
  
  
  Install &lt;a href="https://yeoman.io" rel="noopener noreferrer"&gt;Yeoman&lt;/a&gt; and Hubot generator
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; yo generator-hubot
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Scaffold a Hubot project
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;catbot
&lt;span class="nb"&gt;cd &lt;/span&gt;catbot
yo hubot &lt;span class="nt"&gt;--adapter&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;slack
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Start Hubot using API Token
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;HUBOT_SLACK_TOKEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;xoxb-271695489427-739714865891-Z5gPPiuTORKDFO4QvqKe1B9y ./bin/hubot &lt;span class="nt"&gt;--adapter&lt;/span&gt; slack
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Open Slack and start a conversation
&lt;/h4&gt;

&lt;p&gt;The chatbot should be available under Apps.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fc2zaw1hll2e8oaktq0k7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fc2zaw1hll2e8oaktq0k7.png" alt="slack"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Test with &lt;code&gt;help&lt;/code&gt; command
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fxkl1ynoanx7xm1ujt868.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fxkl1ynoanx7xm1ujt868.png" alt="help"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Recognizing &lt;code&gt;health&lt;/code&gt; command
&lt;/h1&gt;

&lt;p&gt;And make a HTTP GET call to ConfigCat's &lt;code&gt;/health&lt;/code&gt; endpoint and reply back the results via Slack. &lt;/p&gt;

&lt;p&gt;I created a &lt;code&gt;configcat.coffee&lt;/code&gt; under &lt;code&gt;/scripts&lt;/code&gt; folder with the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight coffeescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;robot&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;
    &lt;span class="nx"&gt;robot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;hear&lt;/span&gt; &lt;span class="sr"&gt;/health/i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;
        &lt;span class="nx"&gt;robot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;http&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"https://api.configcat.com/api/v1/health"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;get&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;
            &lt;span class="nx"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;send&lt;/span&gt; &lt;span class="nx"&gt;body&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://github.com/configcat/catbot-example" rel="noopener noreferrer"&gt;See the complete source code on GitHub.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I used CoffeeScript because I like to experiment and it feels fancy. But you can use JavaScript as well.&lt;/p&gt;

&lt;h4&gt;
  
  
  Test if the &lt;code&gt;health&lt;/code&gt; check works
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fds4y7wnsch93v4brictp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fds4y7wnsch93v4brictp.png" alt="health"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Deploying to Heroku
&lt;/h1&gt;

&lt;h4&gt;
  
  
  Check Node.js version
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;node &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open &lt;code&gt;package.json&lt;/code&gt; and check Node.js version. In my case the generated &lt;code&gt;package.json&lt;/code&gt; was &lt;code&gt;"node": "0.10.x"&lt;/code&gt; so I changed it to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"engines"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"node"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"10.16"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Git commit
&lt;/h4&gt;

&lt;p&gt;Make sure you’ve created a git repository, and that your work is committed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git init
git add &lt;span class="nb"&gt;.&lt;/span&gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Initial commit"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Heroku CLI
&lt;/h4&gt;

&lt;p&gt;Install the &lt;a href="https://devcenter.heroku.com/articles/heroku-cli" rel="noopener noreferrer"&gt;Heroku CLI.&lt;/a&gt; then log in.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;heroku login
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create app.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;heroku create
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Set environment variable for API Token.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;heroku config:set &lt;span class="nv"&gt;HUBOT_SLACK_TOKEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;xoxb-271695489427-739714865891-Z5gPPiuTORKDFO4QvqKe1B9yt &lt;span class="nt"&gt;--app&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;arcane-dusk-29327
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Git push
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push heroku master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Avoiding sleep mode
&lt;/h1&gt;

&lt;p&gt;Since I'm using Heroku's free plan, the app will eventually go to sleep mode. To avoid that add &lt;a href="https://www.npmjs.com/package/hubot-heroku-keepalive" rel="noopener noreferrer"&gt;hubot-eroku-keepalive&lt;/a&gt; script to your chatbot.&lt;/p&gt;

&lt;h1&gt;
  
  
  Reference docs
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://hubot.github.com/docs/" rel="noopener noreferrer"&gt;Hubot Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://slack.dev/hubot-slack/" rel="noopener noreferrer"&gt;Slack Developer Kit for Hubot&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://devcenter.heroku.com/categories/deployment" rel="noopener noreferrer"&gt;Heroku Deployment&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>chatbot</category>
      <category>devops</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
