<?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 Standard Library on Medium]]></title>
        <description><![CDATA[Stories by Standard Library on Medium]]></description>
        <link>https://medium.com/@StdLibHQ?source=rss-e1d0a1db0b0d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*WTj0sPrsnbhvgIYs.jpg</url>
            <title>Stories by Standard Library on Medium</title>
            <link>https://medium.com/@StdLibHQ?source=rss-e1d0a1db0b0d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 06:56:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@StdLibHQ/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[Build a “Serverless” SMS FAQ Bot with Node.js, MessageBird and StdLib in 6 Minutes]]></title>
            <link>https://medium.com/@StdLibHQ/build-a-serverless-sms-faq-bot-with-node-js-messagebird-and-stdlib-in-6-minutes-9cd0c78c4ad0?source=rss-e1d0a1db0b0d------2</link>
            <guid isPermaLink="false">https://medium.com/p/9cd0c78c4ad0</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[bots]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[stdlib]]></category>
            <dc:creator><![CDATA[Standard Library]]></dc:creator>
            <pubDate>Tue, 24 Apr 2018 08:00:14 GMT</pubDate>
            <atom:updated>2018-05-09T06:39:27.427Z</atom:updated>
            <content:encoded><![CDATA[<p>Have you ever written an FAQ or document on a website but still get people asking you the same questions? When it comes to users or customers, there’s <a href="https://en.wikipedia.org/wiki/No_such_thing_as_a_stupid_question">no such thing as a bad question</a>, but answering the same questions can become tedious. Have you ever wanted to create a bot that answers all these questions so you don’t personally have to?</p><p>In just<strong> 6 minutes</strong> I will show you how you can build a bot that will <strong>automatically answer questions</strong> from an FAQ via SMS using <a href="http://stdlib.com/">StdLib</a>, MessageBird, and <a href="https://qnamaker.ai/">QnAMaker.ai</a>!</p><p><em>If you’re not familiar with </em><a href="https://stdlib.com/"><em>StdLib</em></a><em> yet, you’re in for a treat! We’re a serverless API development and publishing platform that can help you build and ship custom logic in record time.</em></p><h3>What You’ll Need Beforehand</h3><ul><li>1x Command Line Terminal With <a href="https://nodejs.org/en/">Node.js</a> Installed</li><li>6x Minutes (or 360x Seconds)</li><li>A US Cell Phone Number</li></ul><h3>Minute 1: Create a StdLib Account and Initialize MessageBird</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SGOCpR8s29qRYWfGNXDKYw.png" /></figure><p>Getting started with <a href="http://stdlib.com/">StdLib</a> is easy — head over to our <a href="https://stdlib.com/">website</a>, click “Sign Up” and choose a namespace, email, and password.</p><p>After that you will need to install the StdLib CLI by opening up a terminal and running:</p><pre>$ npm install lib.cli -g</pre><p>Next, we’re going to create a workspace for your StdLib functions. Create a new folder and initialize it with the following commands:</p><pre>$ mkdir stdlib-workspace<br>$ cd stdlib-workspace<br>$ lib init</pre><p>Use the credentials you created earlier.</p><p>We will use the MessageBird API to send and receive text messages. StdLib makes it really easy for you to initialize a number, send and receive messages.</p><p>First, navigate to the <a href="https://stdlib.com/@messagebird/lib/numbers">messagebird.numbers service page on StdLib</a> and accept the terms of service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rFbasXqXVI39rDeqD3q31g.png" /><figcaption>Click the link under the description to view and accept the terms of service</figcaption></figure><p>After you’ve done that, return to your terminal and run:</p><pre>$ lib messagebird.numbers.available --country &lt;CA or US&gt;</pre><p>You should see a list of available, unclaimed telephone numbers. Choose one from the list, then run:</p><pre>$ lib messagebird.numbers.initialize --number &lt;chosen phone number&gt;</pre><p>You can then test your number by sending a text message with the <a href="https://stdlib.com/@messagebird/lib/sms">messagebird.sms.create</a> function.</p><p>Run the following command from your terminal:</p><pre>$ lib messagebird.sms.create \<br>  --recipient &lt;your personal phone number&gt; \<br>  --body Hello from StdLib!</pre><p>And you should receive a text message from the number you’ve just claimed!</p><h3>Minute 2: Train Your FAQ Bot Service Using QnA Maker</h3><p><a href="http://qnamaker.ai/">QnA Maker</a> is a free Microsoft service that allows you to build, train and publish a simple question and answer bot based on FAQ URLs, structured documents or editorial content in minutes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jHtB6Pjr4Tgf9MY4eCnExA.png" /><figcaption>QnAMaker.ai</figcaption></figure><p>Once you have logged in to your <a href="https://portal.azure.com/">Azure portal</a>, go to the “<a href="https://portal.azure.com/#create/Microsoft.CognitiveServicesQnAMaker">Create QnA Maker</a>” page to create your service. If you don’t have a Microsoft Azure account set up, take a minute to set your account-it’s free!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bax3LQvddE6LCBjeIodpSg.png" /></figure><p>Here you will be asked to fill in the name (<em>e.g GHCBot2018</em>) of your service. Fill this out and hit “Create”.</p><p>Next return to <a href="https://www.qnamaker.ai/Create">Create a QnA Service page</a> and select your service from the drop-downs and <strong>name</strong> your KB.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sO6CfHbY7XmymAsnVj4A-w.png" /><figcaption>Select your QnA Maker service from Drop-Downs.</figcaption></figure><p>After you have added your FAQ page (<em>e.g. </em><a href="https://ghc.anitab.org/2018-faq/"><em>https://ghc.anitab.org/2018-faq/</em></a><em>) </em>or a product manual page for it to crawl, click “Create your KB.”</p><p>You will be given the opportunity to review the knowledge base you have created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l5Y4Z8o0R5N1BgN8Q1_ZtA.png" /></figure><ul><li>You must select <strong>Save and train</strong> on the top right to save any edits you make and to train the QnA Maker model.</li></ul><p>Once you are done hit “Publish” to publish your bot.</p><p>You will see a sample <strong>HTTP request page</strong>, keep it open as you will need this information later on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ge-4OzS5wjiW3qhlbz4fdA.png" /></figure><h3>Minute 3: Fork the SMS Handler Sourcecode</h3><p>Now that you have trained your QnA service you will need a handler that will respond to incoming questions sent to your MessageBird number. Thankfully we have a template that you can start with.</p><p>From your main StdLib workspace in your terminal, fork the starter sourcecode by running:</p><pre>$ lib create -s @messagebird/messagehub</pre><p>You’ll be prompted to give your service a name (e.g. QAService) and then hit enter to create your service directory.</p><p>In order to interact with the QnAMaker.ai knowledge base we created, we will need to make a HTTP POST request. To do that we will use a common npm package — <a href="https://www.npmjs.com/package/axios">axios</a>. We will need to install this package in our sourcecode.</p><p>In your service directory where your source code is e.g ./&lt;username&gt;/QAService run:</p><pre>$ npm install --save axios</pre><p>This will modify your package.json file and install the npm package axios into your service directory.</p><h3>Minute 4: Modify Your Handler</h3><p>Assuming you are in the service directory run $ code . or something similar to open the directory in your favorite text editor.</p><p>Your handler service contains three endpoints within the functions directory:</p><ol><li>__main__.js, the main endpoint of your handler. This function will receive events triggered by incoming SMS messages to your MessageBird number and will call other handlers appropriately</li><li>messaging/more.js, a handler for incoming messages that contain the word “more” as their sole contents</li><li>messaging/__notfound__.js, a “not found” handler. If the incoming message can not be mapped to a named function (like more), this handler will be triggered</li></ol><p>For this application we will be modifying messaging/__notfound__.js as most if not all questions will trigger this handler.</p><p>Copy the code below and replace the code in messaging/__notfound__.js</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a39785f847bde1af07704a71e0ccd636/href">https://medium.com/media/a39785f847bde1af07704a71e0ccd636/href</a></iframe><p>In line 16 and 17 you will need to fill in the uri and key from the Sample HTTP request that was provided to you by the QnAMaker.ai service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ge-4OzS5wjiW3qhlbz4fdA.png" /></figure><p>The <strong>uri </strong>e.g. /qnamaker/knowledgebases/123456abcd65efgh54 and k<strong>ey</strong> is the string that comes after Authorization:Endpointkey.</p><p>Alternatively you can also add uri and key as environment variables in our env.json file.</p><p>Due to anti-spam regulations, MessageBird’s API prevents you from sending messages with URLs in them. Please contact us about having this restriction removed at <a href="/service/mailto:contact@stdlib.com">contact@stdlib.com</a>.</p><h3>Minute 5: Setting Your StdLib Token</h3><p>The last bit of code we will need to modify is adding our STDLIB_TOKEN into our env.json</p><p>First, fetch your StdLib Token from the <a href="https://dashboard.stdlib.com/dashboard/">StdLib Dashboard</a>. You’ll be asked to log in again — once you’ve done so, click on <strong>Library Tokens</strong> on the left and you’ll see this page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yJHYIq8SkyAIKM6hb_-X5w.png" /><figcaption>Click “Show Token” to See Your Library Token</figcaption></figure><p>This is your StdLib auth token, click <strong>Show token</strong> to see its value and copy and paste it to your env.json file under STDLIB_TOKEN for &quot;local&quot; and &quot;dev&quot;environments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/1*xKX5nUt9HhiPZAiT9K5Ymg.png" /><figcaption>Default contents of the env.json file</figcaption></figure><h3>Minute 6: Deploying and Set Your Handler</h3><p>When you’re ready, run the following command from your service directory:</p><pre>$ lib up dev</pre><p>The final step is setting the service you just deployed as a handler. Run the following command from your command line:</p><pre>$ lib messagebird.handlers.sms.set \<br>--number &lt;your previously claimed phone number&gt; \<br>--identifier &lt;username&gt;.QAService[@dev]</pre><p>You can see a list of your claimed numbers by running $ lib messagebird.numbers.list if you need to see your claimed number again.</p><h3>Test your FAQ Message Bot</h3><p>To test your amazing new FAQ Bot simply text your claimed MessageBird Number.</p><p>For example, I created a Concierge Bot for the upcoming <a href="https://ghc.anitab.org/2018-attend/">2018 Grace Hopper Celebration</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MWVvdXVwq8-9oMu938UfIA.png" /><figcaption>Grace Hopper Conference Conceirge / FAQ Bot</figcaption></figure><p>That’s it! Your FAQ SMS Bot is live! Thanks for reading, and we hope we’ve been helpful showing you how easy it is to create an FAQ SMS Bot using <a href="https://stdlib.com/">Standard Library</a>, MessageBird and QnA Maker.</p><p><em>StdLib is your new API development solution, built atop serverless architecture for fast deployments and infinite scalability. To stay informed of the latest platform updates, please follow us on Twitter, </em><a href="https://twitter.com/StdLibHQ"><em>@StdLibHQ</em></a><em>, or if you’re interested in joining the team — we’re hiring! Shoot us an e-mail or resume to </em><a href="/service/mailto:careers@stdlib.com"><em>careers@stdlib.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9cd0c78c4ad0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build an Emergency Notification Slack Bot in 10 Minutes with MessageBird, StdLib, and Node.js]]></title>
            <link>https://medium.com/stdlibhq/build-an-emergency-notification-slack-bot-in-10-minutes-with-messagebird-stdlib-and-node-js-7c78932ec6c4?source=rss-e1d0a1db0b0d------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c78932ec6c4</guid>
            <category><![CDATA[slack]]></category>
            <category><![CDATA[stdlib]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[bots]]></category>
            <dc:creator><![CDATA[Standard Library]]></dc:creator>
            <pubDate>Wed, 11 Apr 2018 07:41:52 GMT</pubDate>
            <atom:updated>2018-04-11T07:41:52.492Z</atom:updated>
            <content:encoded><![CDATA[<p>Slack bots can be a fun way for you to add functionality into your Slack workspace. Using <a href="http://stdlib.com/">StdLib</a> you can easily connect APIs to your Slack Bot to create some amazing functionality — like using the MessageBird API to text messages.</p><p>In just 10 minutes we will teach you how to build a simple Slack bot that can send a text message to a number using a simple Slack command.</p><p><em>If you’re not familiar with </em><a href="https://stdlib.com/"><em>StdLib</em></a><em> yet, you’re in for a treat! We’re a serverless API development and publishing platform that can help you build and ship custom logic in record time.</em></p><h3>What You’ll Need Beforehand</h3><ul><li>1x Slack Team</li><li>1x Command Line Terminal</li><li>10x Minutes (or 600x Seconds)</li><li>US Cell Phone Number</li></ul><p>But first…Let’s talk about Slash Commands.</p><h3>What Is a Slash Command?</h3><p>In Slack, slash commands make your users feel powerful. Simply type a slash command in the message field to perform your task in one easy step.</p><p>Slack already has a bunch of in built commands. Check them out <a href="https://get.slack.help/hc/en-us/articles/201259356-using-slash-commands">here</a>.</p><p>Two of my favorites are /me (display italicized action text, e.g. /me does a dance will display as <em>“does a dance”)</em> and /shrugs (Appends ¯\_(ツ)_/¯ to the end of your message). Another very useful one is /dnd which will (<a href="https://get.slack.help/hc/en-us/articles/214908388-Do-Not-Disturb-and-snooze-settings">start or end a do not disturb session</a>)</p><p>With the <em>do not disturb </em>session Slack will automatically disable notifications and it will be harder to reach you. But what happens when you want to contact someone who has it enabled? This is where an emergency notification bot comes in handy!</p><p>In just a few minutes we will teach you how to build an emergency notification bot.</p><h3>Minute 1: Preparing Your New Slack App</h3><p>After making sure you are <a href="https://slack.com/signin">signed in to Slack</a>, visit your Slack Apps page at <a href="https://api.slack.com/apps">https://api.slack.com/apps</a>. You’ll see a screen that looks like the following, depending on whether you have an existing apps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VtmOEa1QivG5FV9XRggZ5g.png" /><figcaption>Click “Create New App”</figcaption></figure><p>Simply click <strong>Create New App</strong> to create your app. You’ll be presented with a modal to enter in your App Name. I suggest DisturbBot since this application will be used to “disturb” members who may not want to be disturbed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I2JnChgXjwfERTxUz0itgw.png" /></figure><p>From here, click <strong>Create App.</strong></p><p>After that find the <strong>Bot Users</strong> option on the left sidebar, under the <strong>Features</strong> heading.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UMRXcbOswvSvS1bPYT2_EQ.png" /><figcaption>Click “Add a Bot User”</figcaption></figure><p>Click <strong>Add a Bot User</strong> to create your bot. You’ll be given an option to enter in the bot username. Click <strong>Add Bot User</strong> to complete the process, and that’s it! Your bot user is now added and ready to be used.</p><h3>Minute 2: Send Messages Using the MessageBird API on StdLib</h3><p>With <a href="https://stdlib.com/@messagebird">MessageBird API on StdLib</a>, you can enjoy seamlessly adding SMS functionality (for customer communication, two-factor authentication and more) into your app using the <a href="https://messagebird.com/">world’s fastest global communication platform, MessageBird</a>, with a simple, functional API on StdLib. But first you’ll need to do a few steps to initialize your first number.</p><h4>Visit the MessageBird’s Profile on StdLib</h4><p>Visit <a href="https://stdlib.com/@messagebird">https://stdlib.com/@messagebird</a> in your browser. You should see a profile page that looks like the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PRXjfrv0XWOOfNzQg6JFJA.png" /><figcaption>MessageBird’s Profile on StdLib</figcaption></figure><p>In order to get started, the first step is to initialize your first phone number<strong>, </strong>but first we’ll have to agree to the MessageBird terms of service. To do this, find the <strong>messagebird.numbers</strong> API on the right hand side of the screen and click on the name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sUmvUarCtL5xi66a06LUVA.png" /></figure><h4>Accept the Terms of Service for MessageBird APIs</h4><p>Great, you found your way around StdLib profiles! (You even have your own generated when you create an account.) Now it’s time to initialize your first phone number, but first we’ll need to accept MessageBird’s Terms of Service (ToS). You should be on a page that looks like the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GPDDn-m5cXhApiTUG-SrRg.png" /><figcaption>The API Reference Page for messagebird.numbers</figcaption></figure><p>This is the <strong>messagebird.numbers</strong> API reference page. If you can’t find this page, simply click here <a href="https://stdlib.com/@messagebird/lib/numbers/#">https://stdlib.com/@messagebird/lib/numbers/#</a> to visit it.</p><p>From here, we can see a list of available API methods. (These are just things you can do with phone numbers!) Before we get started, you’ll notice a <strong>big orange notification</strong> (see above) indicating you need to accept a <strong>Terms of Service</strong> in order to use this API.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*laU4Csk9w8vWqDAPc1bsRw.png" /><figcaption>Click the “click here” button to accept the Terms of Service</figcaption></figure><p>Follow the on-screen instructions to accept. You should see a screen that asks you to claim a StdLib namespace (or if you already have one you can click “Already Registered”) and login there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*wcg3e1_wg1B8atd1SxIXAQ.png" /><figcaption>Claim namespace</figcaption></figure><p>When complete, you should see the following on the API page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7tMLIXHQxpL4DFB794qHRg.png" /><figcaption>You’re all set!</figcaption></figure><p>Great! Now we can use all of MessageBird’s APIs. Let’s initialize that first number!</p><h3>Minute 3: Initialize Your First Phone Number</h3><p>Awesome. We’ve now accepted the MessageBird API’s ToS and we have a StdLib account to boot! Please make sure you’re on the <strong>numbers</strong> API Reference page before continuing: <a href="https://stdlib.com/@messagebird/lib/numbers/#available">https://stdlib.com/@messagebird/lib/numbers/#available</a></p><p>What you’re looking for is the <strong>available</strong> method. You can find it by scrolling down the page, or clicking <strong>available</strong> from the sidebar on the left.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4eCjAJx2r66jQJJwm8Vcsw.png" /><figcaption>The documentation for the “available” API</figcaption></figure><p>From here, we can see a code example and a big green button on the right that says <strong>Run Function</strong>. See the dropdown to the right of the “Run Function” button? There first thing we’ll want to do is select a <strong>Library Token</strong>. If you’re logged in (you should be!), clicking on the dropdown should yield something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/972/1*ajSniPsJU8WI_Rvr7pv6gA.png" /><figcaption>Select one of your Library Tokens</figcaption></figure><p>Select a Library Token, and hit the <strong>Run Function</strong> button. You’ll be greeted with an output like the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*Fw9lUu4d7GmvFXG_lvcMXQ.png" /><figcaption>A list of available numbers</figcaption></figure><p>Don’t lose this! Pick a number that you like (out of the ones shown), and <strong>copy it to your clipboard</strong>. Now you’ll want to go back to the <strong>numbers.initialize </strong>API and paste your number the the number field in the documentation.</p><p>If you can’t find the <strong>numbers.initialize</strong> API, simply click here: <a href="https://stdlib.com/@messagebird/lib/numbers/#initialize">https://stdlib.com/@messagebird/lib/numbers/#initialize</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*68f8qsQczJ1MCdSU_B8tKw.png" /><figcaption>Enter in your Copied Number</figcaption></figure><p>Enter in your chosen number from the result of the <strong>numbers.available</strong> API above. Click <strong>Run Function</strong>, ensuring that the correct Library Token is selected from the Dropdown on the right (unauthenticated won’t work!).</p><p><strong>Congratulations!</strong> You have now received your first <strong>FREE</strong> number with the MessageBird API on StdLib. Additional numbers can be claimed for $0.99 from the <strong>numbers.claim</strong> API.</p><p>If you’d like — you can try sending a message using the <strong>messagebird.sms API. </strong>Click here: <a href="https://stdlib.com/@messagebird/lib/sms/">https://stdlib.com/@messagebird/lib/sms/</a> and fill in the recipient (the number you want to send the message to) and the body (the text message you want to send) choose your Library Token and then run the function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cR9eCoxDb0xxdP3ylTPQPA.png" /><figcaption>Sending a Test Message the SMS API</figcaption></figure><p>If everything is set up correctly the specified recipient should receive a text message. Congratulations! You have just sent your first text message using StdLib and MessageBird.</p><h3>Minute 4: Create a StdLib Workspace</h3><p>Open up your Terminal or Command Line and install the <a href="https://github.com/stdlib/lib">StdLib Command Line Tools</a> with the following:</p><pre>$ npm install lib.cli -g</pre><p>This gives you access to the lib command for service management and execution. Next, create a stdlib directory for your StdLib services.</p><pre>$ mkdir stdlib<br>$ cd stdlib<br>$ lib init</pre><p>You’ll be asked to log in using the credentials you created your account with when signing up for the MessageBird TOS. That’s it!</p><p>You’ll now want to create a StdLib service for your Slack App. You can use the Slack source code to get a bot up and running with very little effort.</p><p>In the stdlib directory you just created, type:</p><pre>$ lib create -s @slack/app</pre><p>You’ll be asked to enter a Service Name, we recommend disturbBotService.</p><h3>Minute 5: Add Your Slack App Credentials</h3><p>Open your env.json (environment variables) under &lt;username&gt;/disturbBotService in a text editor of your choice.</p><p>We’ll be making modifications to the “local” and “dev” environment variables — <strong>make sure you’re modifying the right set!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kzXFAh3zCekvNxSbYdlV6Q.png" /><figcaption>env.json</figcaption></figure><p>First, fetch your StdLib Token from your <a href="https://dashboard.stdlib.com/dashboard/#/tokens">StdLib Dashboard</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MwAUynfjXKfMJem7dEb-sw.png" /><figcaption>Click “Show Token” to See Your Library Token</figcaption></figure><p>This is your StdLib library token. Click <strong>Show token</strong> to see its value and copy and paste it to your env.json file under STDLIB_TOKEN in both the “<strong>dev</strong>” and “<strong>local</strong>” environment variables. Dev values are for your dev environment and release values should only be populated when releasing your application.</p><p>Next, fill out SLACK_APP_NAME, we recommend “Disturb Bot Test App”.</p><p>Finally, go back to your Slack App, and scroll down on the Basic Information panel:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TntqX_i7aVHo4YCW996zhg.png" /></figure><p>Copy each of these values to dev section of env.json: SLACK_CLIENT_ID, SLACK_CLIENT_SECRET, and SLACK_VERFICIATION_TOKEN.</p><p>As a last step, modify SLACK_REDIRECT to https://&lt;username&gt;.lib.id/disturbBotService@dev/auth/ where &lt;username&gt; is your StdLib username.</p><h3>Minute 6: Create Your Command File</h3><p>To add or modify Slash commands, you’ll want to look in your StdLib Slack Source Code directory under &lt;username&gt;/disturbBotService/ functions/commands and create files with the name fucntions/commands/NAME.js where NAME is your intended command.</p><p>Since I suggested /disturb as your command name, I also suggest you name your file:</p><pre>&lt;username&gt;/disturbBotService/functions/commands/disturb.js</pre><p>Fire up your favorite editor and copy the code below into that file.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e864179f33f9a5a6cd8e582f55b73df7/href">https://medium.com/media/e864179f33f9a5a6cd8e582f55b73df7/href</a></iframe><p>In your project directory where your package.json file is run:</p><pre>$ npm i -S libphonenumber-js</pre><p>This will install the npm module libphonenumber-js which is a really useful npm package that helps you parse phone numbers.</p><p>To make sure your slack-app is ready, let’s run a test disturb command locally. Run this command below in your terminal (of course substituting the +11234567890 with the number of your choice).</p><pre>$ lib .commands.disturb test general &quot;+11234567890 Wake up&quot;</pre><p>The command emulates a @ test user executing/disturb +11234567890 Wake up in the channel #general.</p><p>If everything is setup correctly it should send the message “Wake up!” to the number specified.</p><h3>Minute 7: Enable OAuth</h3><p>Next, we’ll enable OAuth. On the sidebar menu, click <strong>OAuth &amp; Permissions</strong>. Once there, you’ll want to enter in a <strong>Redirect URL</strong> as follows: https://&lt;username&gt;.lib.id/disturbBotService@dev/auth/ where &lt;username&gt; is your StdLib username.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C4HvbTEq2xvHgp6zsji0Vw.png" /><figcaption>Add your Auth endpoint, make sure username is correct!</figcaption></figure><h3>Minute 8: Create a New Slash Command</h3><p>The first thing we will need to do is create our new /disturb command.</p><p>Make sure you’re in your <a href="https://api.slack.com/apps">Slack App settings</a> before continuing and then click <strong>Slash Commands</strong> on the sidebar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BrDGwX4Q61Keaj0ICFM5SQ.png" /><figcaption>Click “Create New Command”</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0enlc_5TG98do15jxqX82w.png" /></figure><p>After clicking <strong>Create New Command</strong>, you’ll be asked to enter some command details, here’s what I recommend.</p><ul><li>Command: /disturb</li><li>Request URL:https://&lt;username&gt;.lib.id/disturbBotService@dev/commands/:bg</li><li>Short Description: Sends a text to someone even if they are in dnd mode</li><li>Usage Hint: [phone] [message] e.g. 415-123-4567 Wake up!</li></ul><p>Slack has a <a href="https://api.slack.com/tutorials/slash-commands-style-guide">great style guide</a> you can use as a reference when naming commands.</p><h3>Minute 9: Deploy Your Function to the Cloud</h3><p>Deploying your function to the cloud can be done in one command</p><pre>$ lib up dev</pre><p>And just like that you have a simple Slack Bot that allows you to send text messages to people who may not want to be disturbed.</p><p>Once complete, visit https://&lt;username&gt;.lib.id/disturbBotService@dev/ in your web browser — it should be available to be copy-and-pasted from your command line output. You’ll see a very simple “Add to Slack” button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/340/1*NV0gF2JyKbIVBQrO4rB7LQ.png" /><figcaption>Add Your App to Slack</figcaption></figure><p>Click this button, and accept the requested permissions (we set them up previously), you’ll have to scroll down and click <strong>Authorize</strong>.</p><p>You’ll be returned to your specified auth callback, which should give a success message:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*Tx-zWOjpXI7QvGrZcvdaaQ.png" /><figcaption>Great! You can now use your Slack App!</figcaption></figure><h3>Minute 10: Playing With Your New Slack App</h3><p>You’re all done. Try it out!</p><p>You should be able to send commands in the following format /disturb [phone-number] [message] This should send a emergency notification to the number specified.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QpTY7Hoxkk28vGiA6YOaXg.png" /><figcaption>Disturb Bot waking up our co-founder Jacob</figcaption></figure><p>Check our website <a href="https://stdlib.com/">StdLib.com</a> to join our Slack channel where you can let us know if you need any help and share with us what you are building next! <a href="https://twitter.com/stdlibhq">Follow us on Twitter for more content and updates, @StdLibHQ.</a></p><p><em>StdLib is your new API development solution, built atop serverless architecture for fast deployments and infinite scalability. To stay informed with the latest platform updates, please follow us on Twitter, </em><a href="https://twitter.com/StdLibHQ"><em>@StdLibHQ</em></a><em>, or if you’re interested in joining the team — we’re hiring! Shoot us an e-mail or resume to </em><a href="/service/mailto:careers@stdlib.com"><em>careers@stdlib.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c78932ec6c4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/stdlibhq/build-an-emergency-notification-slack-bot-in-10-minutes-with-messagebird-stdlib-and-node-js-7c78932ec6c4">Build an Emergency Notification Slack Bot in 10 Minutes with MessageBird, StdLib, and Node.js</a> was originally published in <a href="https://medium.com/stdlibhq">Standard Library</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build Better Slack Apps with 4 Tips for Using Attachments and Buttons]]></title>
            <link>https://medium.com/stdlibhq/build-better-slack-apps-with-4-tips-for-using-attachments-and-buttons-e260675eddc1?source=rss-e1d0a1db0b0d------2</link>
            <guid isPermaLink="false">https://medium.com/p/e260675eddc1</guid>
            <category><![CDATA[slack]]></category>
            <dc:creator><![CDATA[Standard Library]]></dc:creator>
            <pubDate>Wed, 28 Mar 2018 15:57:40 GMT</pubDate>
            <atom:updated>2018-03-28T15:58:57.613Z</atom:updated>
            <content:encoded><![CDATA[<p>Slack bots are a super fun and interactive way to build an application that interacts with members and capture their attention. In this article, we help you make it even more fun by adding attachments and buttons.</p><p><strong><em>If you haven’t got a basic Slack App up and running yet, take a look at our tutorial where you can build a </em></strong><a href="https://medium.com/slack-developer-blog/build-a-serverless-slack-bot-in-9-minutes-with-node-js-and-stdlib-b993cfa15358"><strong><em>Slack Bot with StdLib in 9 minutes</em></strong></a><strong><em>. This article is intended as a follow up to the original article.</em></strong></p><p><strong><em>If you’re not familiar with </em></strong><a href="https://stdlib.com/"><strong><em>StdLib</em></strong></a><strong><em> yet, you’re in for a treat! We’re a serverless API development and publishing platform that can help you build and ship custom logic in record time. Local testing, command line tools, hosting, scaling, automatically generated documentation for your APIs, authentication, billing and more included out-of-the-box!</em></strong></p><h3>Tip #1: Making your Slack messages interactive using buttons:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*-bDI4dLldOJQN9g4_XOMiQ.png" /><figcaption>StdLib LunchBot that asks what would you like for lunch today</figcaption></figure><p>At StdLib we overcame our lunch indecision (or lunch paralysis) through our LunchBot. With a simple command our LunchBot lists a few restaurants and asks everyone to vote using buttons.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*NoIWMxz49R7Uwrd2myyWmA.png" /><figcaption>Array of actions our StdLib LunchBot sends</figcaption></figure><p>In Slack, message buttons are are a type of action that you pass into the action array in your attachment.</p><p>Our bot attaches the buttons in array of actions. Here you can see how our lunch bot created two different actions for two different lunch choices. You can also check it out in the <a href="https://api.slack.com/docs/messages/builder?msg=%7B%22text%22%3A%22What%20would%20you%20like%20for%20lunch%20today%3F%22%2C%22attachments%22%3A%5B%7B%22text%22%3A%22Choose%20one%20of%20these%3A%22%2C%22fallback%22%3A%22You%20are%20unable%20to%20choose%20a%20restaurant%22%2C%22callback_id%22%3A%22lunch_food%22%2C%22color%22%3A%22%233AA3E3%22%2C%22attachment_type%22%3A%22default%22%2C%22actions%22%3A%5B%7B%22name%22%3A%22food%22%2C%22text%22%3A%22Dumpling%20Kitchen%22%2C%22type%22%3A%22button%22%2C%22value%22%3A%22dumplingKitchen%22%7D%2C%7B%22name%22%3A%22food%22%2C%22text%22%3A%22Lou%27s%20Cafe%22%2C%22type%22%3A%22button%22%2C%22value%22%3A%22lous%22%7D%2C%7B%22name%22%3A%22food%22%2C%22text%22%3A%22I%20don%27t%20care%20just%20feed%20me.%22%2C%22style%22%3A%22danger%22%2C%22type%22%3A%22button%22%2C%22value%22%3A%22anything%22%2C%22confirm%22%3A%7B%22title%22%3A%22Are%20you%20sure%3F%22%2C%22text%22%3A%22Do%20you%20not%20like%20food%3F%22%2C%22ok_text%22%3A%22Yes%22%2C%22dismiss_text%22%3A%22No%22%7D%7D%5D%7D%5D%7D">message builder</a>. In a subsequent tutorial, we’ll have more detail on how you can implement handlers for those actions.</p><p>Check out Slack’s guide to <a href="https://api.slack.com/docs/message-buttons">attaching interactive message buttons</a> for more information on buttons.</p><p>Here we’ll show you can build and deploy this really quickly. (<a href="https://medium.com/slack-developer-blog/build-a-serverless-slack-bot-in-9-minutes-with-node-js-and-stdlib-b993cfa15358"><em>This assumes you’ve gone through our tutorial on how to get a Slack Bot up and running with StdLib in 9 minutes</em></a><em>)</em></p><p>In your service look for the file functions/commands/hello.js and modify the callback function to include the text and attachment. The results of the callback get passed directly into <a href="https://api.slack.com/methods/chat.postMessage">chat.postMessage</a>.</p><p><em>For example:</em></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a84cad9a7ed3160601ed6c3fafd934c4/href">https://medium.com/media/a84cad9a7ed3160601ed6c3fafd934c4/href</a></iframe><p>After you modify the file run lib up dev then you can test it by running /hello command in Slack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*PtYKPq2wBS5hvTt2ESNwkg.gif" /><figcaption>LunchBot in action</figcaption></figure><h3>Tip #2: Making your Slack messages interactive using images:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/616/1*nz-aaJYpfssKva909urdPg.gif" /><figcaption>StdLib LunchBot that gently encourages you to make a decision</figcaption></figure><p>Sometimes you want to add an image to your message to create a more dramatic effect.</p><p>In our Lunch Bot if nobody makes a decision or you choose not to decide we f̶o̶r̶c̶e encourage people to pick by t̵h̵r̵e̵a̵t̵e̵n̵i̵n̵g suggesting <a href="https://twitter.com/keithwhor">Keith’s (CEO and founder of StdLib)</a> favorite restaurant as a place to eat.</p><p>Below you can see the JSON that we pass into the message to send an image and format it as an attachment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jun6M3TI-dIpXIN50dJRXg.png" /><figcaption>List of parameters our bot sends to customize the attachment</figcaption></figure><p>Just like buttons you can pass the <strong>image_url </strong>and other parameters into the attachment array to customize your attachment. Feel free to play with our message or create your own in the <a href="https://api.slack.com/docs/messages/builder?msg=%7B%22attachments%22%3A%5B%7B%22pretext%22%3A%22If%20nobody%20decides%20then%20we%20eating%20here%22%2C%22fallback%22%3A%22We%20are%20going%20to%20show%20you%20a%20photo%20of%20Keith%27s%20favorite%20restaurant%22%2C%22color%22%3A%22danger%22%2C%22title%22%3A%22Keith%27s%20favorite%20restaurant%22%2C%22text%22%3A%22Subway%22%2C%22image_url%22%3A%22https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2Fthumb%2Fc%2Fc7%2FSubway_submarine_sandwich.JPG%2F640px-Subway_submarine_sandwich.JPG%22%2C%22footer%22%3A%22Keith%27s%20favorite%20food%22%2C%22footer_icon%22%3A%22https%3A%2F%2Fpbs.twimg.com%2Fprofile_images%2F701654166255439872%2Fm17Oc-G4_400x400.jpg%22%7D%5D%7D">message builder</a>.</p><h3>Tip #3: Use <a href="https://api.slack.com/docs/messages/builder?msg=%7B%22text%22%3A%22What%20would%20you%20like%20for%20lunch%20today%3F%22%2C%22attachments%22%3A%5B%7B%22text%22%3A%22Choose%20one%20of%20these%3A%22%2C%22fallback%22%3A%22You%20are%20unable%20to%20choose%20a%20restaurant%22%2C%22callback_id%22%3A%22lunch_food%22%2C%22color%22%3A%22%233AA3E3%22%2C%22attachment_type%22%3A%22default%22%2C%22actions%22%3A%5B%7B%22name%22%3A%22food%22%2C%22text%22%3A%22Dumpling%20Kitchen%22%2C%22type%22%3A%22button%22%2C%22value%22%3A%22dumplingKitchen%22%7D%2C%7B%22name%22%3A%22food%22%2C%22text%22%3A%22Lou%27s%20Cafe%22%2C%22type%22%3A%22button%22%2C%22value%22%3A%22lous%22%7D%2C%7B%22name%22%3A%22food%22%2C%22text%22%3A%22I%20don%27t%20care%20just%20feed%20me.%22%2C%22style%22%3A%22danger%22%2C%22type%22%3A%22button%22%2C%22value%22%3A%22anything%22%2C%22confirm%22%3A%7B%22title%22%3A%22Are%20you%20sure%3F%22%2C%22text%22%3A%22Do%20you%20not%20like%20food%3F%22%2C%22ok_text%22%3A%22Yes%22%2C%22dismiss_text%22%3A%22No%22%7D%7D%5D%7D%5D%7D"><strong>the Slack Message Builder</strong></a> to test different messages.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3Aa61LREqTxTK95qlm-kcg.png" /><figcaption>Testing a message in the Slack Message Builder</figcaption></figure><p>Once you have opened <a href="https://api.slack.com/docs/messages/builder?msg=%7B%22text%22%3A%22What%20would%20you%20like%20for%20lunch%20today%3F%22%2C%22attachments%22%3A%5B%7B%22text%22%3A%22Choose%20one%20of%20these%3A%22%2C%22fallback%22%3A%22You%20are%20unable%20to%20choose%20a%20restaurant%22%2C%22callback_id%22%3A%22lunch_food%22%2C%22color%22%3A%22%233AA3E3%22%2C%22attachment_type%22%3A%22default%22%2C%22actions%22%3A%5B%7B%22name%22%3A%22food%22%2C%22text%22%3A%22Dumpling%20Kitchen%22%2C%22type%22%3A%22button%22%2C%22value%22%3A%22dumplingKitchen%22%7D%2C%7B%22name%22%3A%22food%22%2C%22text%22%3A%22Lou%27s%20Cafe%22%2C%22type%22%3A%22button%22%2C%22value%22%3A%22lous%22%7D%2C%7B%22name%22%3A%22food%22%2C%22text%22%3A%22I%20don%27t%20care%20just%20feed%20me.%22%2C%22style%22%3A%22danger%22%2C%22type%22%3A%22button%22%2C%22value%22%3A%22anything%22%2C%22confirm%22%3A%7B%22title%22%3A%22Are%20you%20sure%3F%22%2C%22text%22%3A%22Do%20you%20not%20like%20food%3F%22%2C%22ok_text%22%3A%22Yes%22%2C%22dismiss_text%22%3A%22No%22%7D%7D%5D%7D%5D%7D">the Slack Message Builder,</a> you will be able to modify the JSON and preview your message instantly.</p><p>For now, you can explore with <a href="https://api.slack.com/docs/messages/builder?msg=%7B%22text%22%3A%20%22This%20is%20a%20line%20of%20text.%5CnAnd%20this%20is%20another%20one.%22%7D">basic formatting</a> or <a href="https://api.slack.com/docs/messages/builder?msg=%7B%22attachments%22%3A%5B%7B%22fallback%22%3A%22Required%20plain-text%20summary%20of%20the%20attachment.%22%2C%22color%22%3A%22%2336a64f%22%2C%22pretext%22%3A%22Optional%20text%20that%20appears%20above%20the%20attachment%20block%22%2C%22author_name%22%3A%22Bobby%20Tables%22%2C%22author_link%22%3A%22http%3A%2F%2Fflickr.com%2Fbobby%2F%22%2C%22author_icon%22%3A%22http%3A%2F%2Fflickr.com%2Ficons%2Fbobby.jpg%22%2C%22title%22%3A%22Slack%20API%20Documentation%22%2C%22title_link%22%3A%22https%3A%2F%2Fapi.slack.com%2F%22%2C%22text%22%3A%22Optional%20text%20that%20appears%20within%20the%20attachment%22%2C%22fields%22%3A%5B%7B%22title%22%3A%22Priority%22%2C%22value%22%3A%22High%22%2C%22short%22%3Afalse%7D%5D%2C%22image_url%22%3A%22http%3A%2F%2Fmy-website.com%2Fpath%2Fto%2Fimage.jpg%22%2C%22thumb_url%22%3A%22http%3A%2F%2Fexample.com%2Fpath%2Fto%2Fthumb.png%22%2C%22footer%22%3A%22Slack%20API%22%2C%22footer_icon%22%3A%22https%3A%2F%2Fplatform.slack-edge.com%2Fimg%2Fdefault_application_icon.png%22%2C%22ts%22%3A123456789%7D%5D%7D">attachments</a>. If you are feeling particularly creative, you can get fancy with <a href="https://api.slack.com/docs/messages/builder?msg=%7B%22text%22%3A%22Would%20you%20like%20to%20play%20a%20game%3F%22%2C%22attachments%22%3A%5B%7B%22text%22%3A%22Choose%20a%20game%20to%20play%22%2C%22fallback%22%3A%22You%20are%20unable%20to%20choose%20a%20game%22%2C%22callback_id%22%3A%22wopr_game%22%2C%22color%22%3A%22%233AA3E3%22%2C%22attachment_type%22%3A%22default%22%2C%22actions%22%3A%5B%7B%22name%22%3A%22game%22%2C%22text%22%3A%22Chess%22%2C%22type%22%3A%22button%22%2C%22value%22%3A%22chess%22%7D%2C%7B%22name%22%3A%22game%22%2C%22text%22%3A%22Falken%27s%20Maze%22%2C%22type%22%3A%22button%22%2C%22value%22%3A%22maze%22%7D%2C%7B%22name%22%3A%22game%22%2C%22text%22%3A%22Thermonuclear%20War%22%2C%22style%22%3A%22danger%22%2C%22type%22%3A%22button%22%2C%22value%22%3A%22war%22%2C%22confirm%22%3A%7B%22title%22%3A%22Are%20you%20sure%3F%22%2C%22text%22%3A%22Wouldn%27t%20you%20prefer%20a%20good%20game%20of%20chess%3F%22%2C%22ok_text%22%3A%22Yes%22%2C%22dismiss_text%22%3A%22No%22%7D%7D%5D%7D%5D%7D">message buttons</a>.</p><h3>Tip #4: Use the <a href="https://api.slack.com/methods/chat.postMessage/test"><strong>API (chat.postMessage) Tester </strong></a>to test sending your message</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l-j9C0muvz3HTwPRz5-uNA.png" /><figcaption>chat.postMessage tester</figcaption></figure><p>The <a href="https://api.slack.com/methods/chat.postMessage/test">chat.postMessage tester</a> is a great way for you to try sending your message to different workspaces and channels and see how it looks</p><p>You can experiment by sending different text messages and attachments in JSON format.</p><p>I hope these four tips help you build some cool and interesting bot messages.</p><p>Go to <a href="https://stdlib.com/">StdLib</a> to join our Slack channel where you can let us know if you need any help and share with us what you are building next! <a href="https://twitter.com/stdlibhq">Follow us on Twitter for more content and updates, @StdLibHQ.</a></p><p><em>P.S. Correction by Keith, his favorite restaurant is </em><a href="http://www.louscafesf.com/"><em>Lou’s Cafe in San Francisco</em></a><em>.</em></p><p><em>StdLib is your new API development solution, built atop serverless architecture for fast deployments and infinite scalability. To stay informed with the latest platform updates, please follow us on Twitter, </em><a href="https://twitter.com/StdLibHQ"><em>@StdLibHQ</em></a><em>, or if you’re interested in joining the team — we’re hiring! Shoot us an e-mail or resume to </em><a href="/service/mailto:careers@stdlib.com"><em>careers@stdlib.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e260675eddc1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/stdlibhq/build-better-slack-apps-with-4-tips-for-using-attachments-and-buttons-e260675eddc1">Build Better Slack Apps with 4 Tips for Using Attachments and Buttons</a> was originally published in <a href="https://medium.com/stdlibhq">Standard Library</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[StdLib Platform Updates: Faster Deployments, Node 8.10.0 and New Profile Pages]]></title>
            <link>https://medium.com/stdlibhq/stdlib-platform-updates-faster-deployments-node-8-10-0-and-new-profile-pages-cc207a019b21?source=rss-e1d0a1db0b0d------2</link>
            <guid isPermaLink="false">https://medium.com/p/cc207a019b21</guid>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Standard Library]]></dc:creator>
            <pubDate>Tue, 20 Mar 2018 08:09:19 GMT</pubDate>
            <atom:updated>2018-03-20T08:18:36.475Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey everyone! We’re excited to be able to announce a few StdLib platform updates. Service deployment has been sped up, and the default Node engine upgraded to 8.10.0, and we’re pleased to launch a more personalized profile page experience for developers and businesses — customize the look of your StdLib account to express your individuality, or to welcome users to your business and APIs.</p><p>If you’re not familiar with StdLib, we’re an API development and publishing platform that runs on serverless architecture. What that means is that we’re the fastest way for developers to turn their Node.js code into live, infinitely-scalable, production-ready API endpoints with automated documentation, authentication, rate-limiting, billing, SDK generation and more. We also enable simple, seamless integration with existing APIs in our library, like <a href="https://stdlib.com/@messagebird/">sending SMS with one line of code via MessageBird</a>. If you’re interested in getting started, <a href="https://github.com/stdlib">our Github page will walk you through the process of signing up and creating your first service</a>.</p><h3>Even Faster Deployments</h3><h3>Emmie Päivärinta on Twitter</h3><p>One big advantage of @StdLibHQ over AWS lambda is that deploying is always really fast. Nothing messes with your workflow like having to wait a minute to see your changes.</p><p>Having a short feedback loop plays a significant role in making programming enjoyable and productive. StdLib users have always enjoyed short deploy times, and they just got even better. We’ve cut the majority of deploy times <em>in half</em> by providing a caching layer for your Node.js dependencies, which means consecutive deployments will be <em>much faster, </em>tightening your build-deploy-iterate loop and allowing you to build your APIs at lightning speed. We’re talking in the range of <strong>sub-4s deployments</strong> for packages of all sizes, including automated NPM installation.</p><h3>Node 8.10.0 Support</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/418/1*9QlvEzEbaDZT0ZuJLkIkSA.png" /><figcaption>Overriding the default node.js engine</figcaption></figure><p>StdLib now ships with Node 8.10.0 as the default engine for functions. To use the previous engine versions, you can manually set the “engine” field in the “stdlib” object of your package.json. You can check out the release notes for Node 8.10.0 <a href="https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V8.md#8.10.0">here</a>.</p><h3>New Profile Pages</h3><p>Last but certainly not least, we have released our new profile pages. Check out how one of our partners, <a href="https://stdlib.com/@messagebird/">MessageBird</a>, has customized their StdLib profile.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5myxPJIHHsc1YgNRbILk_g.png" /><figcaption>Profile page for MessageBird — check it out at <a href="https://stdlib.com/@messagebird/">https://stdlib.com/@messagebird/</a></figcaption></figure><p>Editing a profile page is simple: when you’re on your own page, you’ll see a bright red <strong>Edit Profile</strong> button on the top right. Simply click it to enter <em>Edit Mode</em> and start editing! Click it again to <strong>Save Changes</strong> when you’re done modifying your profile. Here’s an example of Justin’s profile page, a little bit more personal and less business-oriented:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fczl39pMvisVlq0sV2Pd8w.png" /><figcaption>Justin’s profile page with cover photo — check it out at <a href="https://stdlib.com/@jwoo">https://stdlib.com/@jwoo</a></figcaption></figure><p>We hope you like it, we would love to hear what you think, and we can’t wait to see what you build next — enjoy!</p><p><em>StdLib is your new API development solution, built atop serverless architecture for fast deployments and infinite scalability. To stay informed with the latest platform updates, please follow us on Twitter, </em><a href="https://twitter.com/StdLibHQ"><em>@StdLibHQ</em></a><em>, or if you’re interested in joining the team — we’re hiring! Shoot us an e-mail or resume to </em><a href="/service/mailto:careers@stdlib.com"><em>careers@stdlib.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc207a019b21" width="1" height="1" alt=""><hr><p><a href="https://medium.com/stdlibhq/stdlib-platform-updates-faster-deployments-node-8-10-0-and-new-profile-pages-cc207a019b21">StdLib Platform Updates: Faster Deployments, Node 8.10.0 and New Profile Pages</a> was originally published in <a href="https://medium.com/stdlibhq">Standard Library</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>